Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

With Windows 8, why isn't a mapped drive available under an elevated cmd prompt but is under a regular cmd prompt? I can run a net use and get it to be available but I still find this odd.

Thanks

share|improve this question
Are you elevating the command prompt as the same user or are you using runas or alternate credentials? – MDMarra Oct 8 '12 at 22:22
Does the elevated user have the appropriate Share and NTFS permissions on the share? – joeqwerty Oct 8 '12 at 22:32
Ask Microsoft support. – John Gardeniers Oct 29 '12 at 10:51

migrated from serverfault.com Oct 29 '12 at 10:51

2 Answers

up vote 4 down vote accepted

When using UAC with an administrative user, at login, Windows creates two tokens. One token (the elevated one) is unfiltered, and has the Administrators group enabled. The other token has the Administrators group (and some other details, like the Power Users group) filtered out.

Since these two tokens have separate security contexts, network connections in one aren't available in the other, even if it's really the same user.

So if you map a drive using Explorer, an elevated Command Prompt (or any other elevated process) won't be able to see it.

You can map the same network resource (using the same drive letter, even) in your elevated Command Prompt using the NET USE command. After that, any elevated process will also be able to see it.

share|improve this answer
1  
Is there a way to use Explorer AND have the drive be visible to all users? – JimDel Oct 9 '12 at 14:19
net use e: \\computerName\folder password /user:domain\username /p:yes is the commanded I ended up using that made it work. (Where e: is the drive letter you are mapping, \\computername\folder is the path to be mapped, and password, domain and username are the normal credentials to log-in. Hope that helps someone. I followed on example from here pcsupport.about.com/od/commandlinereference/p/… – phyatt Mar 27 at 23:15

Because you're elevating the command prompt as a different user, and the mapped drive in question was mapped by the non-administrative user. Different users have different user settings, like printers, mapped network drives and so on.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.