I ran across this today and wanted to be sure to save it. I’m not sure where I’ll use it yet, it needs further investigation.
One of the interesting road blocks that Microsoft built into Windows Operating systems starting with Vista, so 7, 2008 etc. are included, is when a command window or other program is run as administrator, they don’t receive the user’s mapped drives, or other shared network connections.
Microsoft built a fix into the OS, but in their KB 937624 they state “Important This workaround may make your system unsafe. Microsoft does not support this workaround. Use this workaround at your own risk.” so who knows what that means. As always, use this information at your own risk.
The issue is with an OS level item called tokens, by default the administrator doesn’t share or use the user’s tokens. One entry in the registry, and presto, the administrator can borrow those tokens, so that program gets all the users mapped drives and other shares. What’s not to love.
There are 2 ways of doing it. I created a Registry file that imports the key, or you can easily do it manually here’s how.
Start Regedit, go to
- Point to New, and then click DWORD Value.
- Type EnableLinkedConnections, and then press Enter.
- Right-click EnableLinkedConnections, and then click Modify.
- In the Value data box, type 1, and then click OK.
Exit Regedit restart the computer and Administratively run programs will get the users shares. They don’t mention why they don’t support this, it likely makes a window where a properly programmed rouge program might exploit some issue.
Don’t forget Reboot, this is a machine level item, typically only read during initial system startup.