Friday, August 6, 2010

Accessing Network resources as Administrator on Windows 7

One of the problems I had when using RubyGems (Ruby 1.91) on Windows 7 was that my homedrive is on a network drive.
So when running rubygems in an elevated command prompt (ie running "As Administrator"), rubygems exited with an error something like could not access H:\. Now this is a problem for me since I want those rubygems on my laptop because I want to be able to work offline (ie at home etc).

After some googling I found out that when running as Administrator the network resources that you have as a normal user are not accessible when you are running as Administrator.
This article here from Microsoft support describes how to do this. Cutting to the chase, you need to:

  1.  create an DWORD key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System called EnableLinkedConnections and set it's value to 1. 
  2. Reboot
And that's it! Now your existing resources are available when you run as Administrator.

No comments:

Post a Comment