5

On my PC when i got to mount a network drive it doesnt give me any option about whether to connect as normal user or administrator. This causes a problem later on when I try and access the drive via my IDE (Integrated Developement Environment) because the IDE runs with elevate adminstrator permissions and because the network drive was not mounted as administrator the application does not have permission to access the netork drive.

The problem is documented here

https://support.microsoft.com/en-gb/help/3035277/mapped-drives-are-not-available-from-an-elevated-prompt-when-uac-is-co

Workaround 2 says to just mount them from a bat file as adminstrator, but it gives me no instructions on how to do this. And I am confused is there no way to do this via the Windows UI when I mount the drive ?

2
  • Drives are always mapped in the users' context. Running something as an admin means running it as a different user, and that other user will need its own drive maps. It's not a problem or error or evidence of anything broken. Sep 8, 2017 at 16:48
  • @music2myear i understand its not a bug, but my user has admin permissions and I dont have a seaprate admin user so how can i map drives as that separte user. Sep 8, 2017 at 20:00

1 Answer 1

10

Create a batch file containing

net use x: \\server\share

Then right click and run as an administrator. If you want it to persist after reboots, then append the command with /persistent:yes.

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