I was trying to map Office 365 SharePoint WebDav theme location to do branding and was started getting error:
"The mapped network drive could not be created because the following error has occured:
Access Denied. Before Opening ...."
2 Answers
I fixed that by:
1. Adding the url to Trustest Sites list in Internet Explorer.
2. I logged in to Office 365 SharePoint public facing site, Site Settings > Design Manager > Actions > Open in Windows Explorer
Microsoft have a general purpose troubleshooting guide for mapping network drives to SharePoint Online here: http://support.microsoft.com/en-us/kb/2616712
To make your drive available on reboot, you can script the authentication with Internet Explorer using PowerShell. There is a PowerShell script you can use here http://www.lieben.nu/numb3rs/?page_id=129 and then customise so suit your needs.
The PowerShell/scripting approach does rely on automating Internet Explorer to create the cookies which can be unreliable at times. If you would consider a commercial solution for drive mapping then take a look at Zee Drive which authenticates to SharePoint Online directly, maps the drives permanently and does a whole lot more such as local caching: http://www.thinkscape.com/Map-Network-Drives-To-Office-365-OneDrive/
Disclosure: Zee Drive is a tool my company develops