Monday, September 20, 2010

How to Map Skydrive as a Network Drive in Windows 7

There are already many posts about mapping Skydrive as a network drive in Windows and you are wondering why I am creating a new one. The reason is very simple, none of these existing posts worked for me. So, I decided to put together all the information that worked for me, and hopefully it can help someone else with the same problem.

Check Your Windows Environment

The first step is to make sure your Windows environment is ready for this mapping. I am using Windows 7 x64, so I am not sure if this applies to other Windows versions, but it does not hurt to check.

1. WebClient Windows Service must be running as discussed here.

  • Open the Services management console (Start / Run / services.msc) and locate the WebClient service.
  • Start the WebClient service if it is stopped.
  • Open its Properties window, and set the Startup type to Automatic.
Note: Although this service was already running for me, I still had to restart it and set it to automatic startup in order to be able to map Skydrive.

2. Internet Explorer - LAN Settings should have Automatically detect settings unchecked
  • Open Internet Explorer.
  • Go to Tools, Internet Options.
  • Click on the Connections tab, and click on the LAN Settings.
  • Uncheck the Automatically detect settings.
Note: This might sound weird to check, but I also had to change this setting in order to make it work. When trying to map Skydrive using Windows Explorer, it was asking for my Windows Live credentials multiple times (about 3 times) until it fails.
    Determine the WebDAV access address

    The second step is to determine the proper address (WebDAV access address) you should use to connect to a Skydrive folder. You cannot directly use the URL shown in your browser since it does not work. You will need to get the WebDAV access address by using one of the following options:
    • Manually figure out the address based on the browser URL as described here. I do not recommend this method since the folder name might be different than the one seen on the browser. For example, here it mentions that "Documents" folder should be "^2Documents", but for me it was "^.Documents".
    • Use MS Office 2010 to save a document to Skydrive and then be able to see the WebDAV access address as described here. It would be a good option if you have this version of MS Office.
    • Build your own application that access http://docs.live.net/SkyDocsService.svc and query for the WebDAV folders. It is good to know about this WCF service, but it will take sometime to build a client application.
    • Use an existing application that uses the SkyDocsService and retrieve the information we need: http://skydrivesimpleviewer.codeplex.com/. This open source project provides a command prompt application dumpurls.exe and also a WPF application SkyDriveSimpleViewer.exe.
    I decided to use the simplest way, e.g. the dumpurls.exe command prompt application. Download dumpurls.exe, and run it from a Command Prompt window by passing your email (Windows Live or Hotmail) and your password. If you are not confident about passing your credentials to this application, you can temporary change your password in Windows Live before running this application, and restore it after.

    DumpUrls.exe me@hotmail.com p4ssw0rd
    

    The output is something like:

    https://zzzzzz.docs.live.net/yyyyyyyyyyyyyyyy/^.Documents
    https://xxxxxx.docs.live.net/yyyyyyyyyyyyyyyy/MyFolder
    

    You will not use these URLs directly, but the corresponding paths instead:

    \\zzzzzz.docs.live.net@SSL\yyyyyyyyyyyyyyyy\^.Documents
    \\xxxxxx.docs.live.net@SSL\yyyyyyyyyyyyyyyy\MyFolder
    

    Map Skydrive as Network Drive

    Although you can map it by using Windows Explorer, I mapped using a single command line in the Command Prompt window. So, open a Command Prompt window and run the following command to map a folder named MyFolder to the drive Z by using your credentials:

    net use Z: "\\xxxxxx.docs.live.net@SSL\yyyyyyyyyyyyyyyy\MyFolder" /user:me@hotmail.com p4ssw0rd /persistent:yes
    

    The expected output is:
    The command completed successfully.
    

    Note: these are the errors I had before I fixed my Windows environment as explained in the beginning of this article:
    • System error 5 has occurred: the solution for me was to change the IE setting described above.
    • System error 1920 has occurred: the solution was to restart the WebClient service as described above.
    Now, you can just open Windows Explorer and start using your new drive on the cloud. I noticed that Windows Explorer does not report the proper used and free space, it might show that you have more than 25GB available.

      4 comments:

      Anonymous said...

      Luis, I followed your instructions (which were the best I could find) and got to the point where it was 'attempting to connect...' which finally ended with the error msg 'Workstation Driver Not Installed'. Can you help me out with this? Running XP Pro with all current updates.

      Thanks Jim

      Luis Rocha said...

      Hi Jim,

      According to here, it seems that XP only supports SSL/HTTPS connections through My Network Places and the net use command above will not work.

      See the instructions of how to add a WebDAV folder as a network place. Also, try using the URL returned by dumpurls.exe first, i.e. https://xxxxxx.docs.live.net/yyyyyyyyyyyyyyyy/MyFolder

      Cheers,
      Luis

      Anonymous said...

      Luis, SUCCESS! I can map it as a network drive and as a network place. However...

      As a network drive, I can't do anything but look at the directory in Explorer. No copy/paste, drag/drop, nothing.

      As a network place, Explorer works, but only for some file types. For example, PDF files work, jpg do not. And I can not open a PDF file that i put on the SkyDrive. I can copy it back to my machine, but that sort of defeats having it mapped.

      Your advice has been excellent so far and I really appreciate it. I hope you can help me get over this last hurdle.

      Thanks again, Jim

      Mark Gallagher said...

      hey luis, when you tried using windows explorer to map skydrive, are you sure it wasnt asking you for your skydrive credentials? ive mapped like that before and i put in my skydrive credentials and logged in with no problem.

      currently i have having a problem mapping on a laptop using the same method i have used on 3 other desktops with no problems.

      going to try your recommendations when i can get my hands on that laptop again and i will let you know how it works