Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Run as Admin and Network Drive

31 Oct 2009   #1
pezzman74

Windows 7
 
 
Run as Admin and Network Drive

I have a Drobo set up as a network drive -via droboshare - everything works fine, however applications (specifically backup software, drobo copy or Bonkey) cannot see the dirve which is mapped to z: when the application are set to run as administrator. Drobocopy requires this so turning it off is not an option. Bonkey doesn't but I am having issues running it and I think turning it on might help. Any ideas? I have tried turning off my firewall but that hasn't helped.


My System SpecsSystem Spec
.

31 Oct 2009   #2
H2SO4

Win7x64
 
 

Short version: network drive definitions exist only for the user who mapped them. If userX defines a "Z:" network drive mapping, userY will be unable to access it (they won't even see a "Z:") unless they too map the drive under their own account.


======================================================
Detail: for security reasons, network drive mappings in XP and later versions of Windows are user-specific. Administrative group membership has nothing to do with it. Each user sees the "global" drive definitions which correspond to local devices (A:, C:, D:, ... whatever), plus those network drive definitions which they themselves created.

On a code level, the identity of the user account which calls the drive-mapping DefineDosDevice API determines who gets to "see" the mapping. If the account is anybody other than SYSTEM, the mapping will be placed into a session-specific namespace which is invisible to other sessions/accounts.

In situations where you want all users to see a particular network drive, the obvious workaround is to call DefineDosDevice() in the SYSTEM context. That will lead to the definition being placed in the global namespace where it will be available to all users, just like A:, C:, ...

One way to run code as system is to use the PsExec utility from sysinternals with its "-s" command line option. Start a CMD prompt in an elevated context (run as admin), and use that to issue something like the following command:

PSEXEC -S -I CMD.EXE

That will start a second CMD instance which will run in the SYSTEM context. If you map the Z: drive from there, it'll subsequently be visible to all users:

NET USE Z: \\TargetName\TargetShare

Because child processes inherit the access token of their parent, in this instance NET.EXE will also run in the SYSTEM context. You could also specify the "net use" comand-line argument to PsExec, but it's not as obvious what's happening, expecially while you're tinkering with this stuff the first few times.
My System SpecsSystem Spec
23 Nov 2009   #3
flabdablet

Ubuntu
 
 

There's also a registry value that tells Windows to link the drive mappings for elevated and non-elevated processes within the same user account:

Windows Vista UAC Tip - Drives not mapped for admin token - Windows Connected
After you turn on User Account Control in Windows Vista, programs may be unable to access some network locations

Both articles are about Windows Vista, but I have verified that the same tweak works in Windows 7.
My System SpecsSystem Spec
.


Reply

 Run as Admin and Network Drive




Thread Tools





Similar help and support threads
Thread Forum
Issues with admin elevation from system drive
Hey Everyone, my first time on the forums here, and hopefully i am posting in the right section! This is going to be a bit of an in depth explanation here and i am sure i will leave stuff out that we have already tested, as i have done a fair bit of tested into what exactly is happening. ...
General Discussion
Internet Connection Sharing has been disabled by the Network Admin...
So i try to share my Wireless connection on Windows 7. When i go to Advanced Tab, it says "Internet Connection Sharing has been disabled by the Network Administrator". So i cant enable it. Help please. Here a screen shot (its in norwegian): http://up.picr.de/15656542gm.png
Network & Sharing
cannot change disk from C: to V: with admin right on a domain network
hi, when i log on to a employes PC, and run an elevated CMD(admin) and type my admin logons. on the same doamin we both are belong to. then i dont get allow to change from disk C: to disk V:. but if i rin a normal CMD then i can change disk. but then i dont get the rights to install a...
General Discussion
Admin rights are removed when connected to the company network
I am allowed to make myself an admininstrator while on the network or off the network but the next time (which is the second, the first time is to make the changes), my administrator rights disappear. I have added myself as an admininstrator in every way listed I think on all threads with no luck.
Network & Sharing
You do not have permission to access. Contact your network admin
The are 3 PCs, all Windows 7, all the same workgroup, two of them same homegroup. Problem. Try to share a folder on RAFALEK-PC, created account user/password, set permission etc. And one PC (not in the homegroup) when try to connect , gets window asking for user/password and when enter...
Network & Sharing
Map Network Drive and Disconnect Network Drive - Add or Remove
How to Add or Remove "Map Network Drive" and "Disconnect Network Drive" Options This will show you how to add or remove Map Network Drive and Disconnect Network Drive from the toolbar, Tools menu, ribbon (Windows 8), and drive icon's context menu in Windows Explorer and Network Locations for...
Tutorials

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 22:54.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App