Try to mount network drive with system
priveleges:
Download PSTools from https://learn.microsoft.com/en-us/sysinternals/downloads/psexec, unpack it.
From PSTools
folder via CMD (started as admin) execute psexec -i -s cmd.exe
, accept agreement (or execute psexec -accepteula -i -s cmd.exe
to skip agreement).
In popped-up CMD's window execute whoami
to check that you are now identified as nt authority\system
.
In that window execute your net use
command like net use z: \\123.111.111.111\my_share /persistent:yes
If you got System error 58
, try to execute command with specifying user/password in quotes like:
net use z: \\123.111.111.111\my_share /persistent:yes /user:"your username" "your password"
If in the future you will need to disconnect that network drive, perform step 2, then execute net use z: /delete
. Or just reboot OS.
Also you can try to modify the registry: in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
create a DWORD
entry named EnableLinkedConnections
with a value of 1
. Reboot the computer. Network drives mapped by the same user, even under different security contexts, will appear to programs running as that user.