Jac Mos
Jac Mos

Reputation: 9066

Drive mapping unavailable when added via registry

I want to add drive mapping from my c# app for specific user on remote machine. I'm trying to do it by adding new registry key.

When I add new drive mapping in registry, adding new key in:

HKEY_USERS\< USER >\Network

so, for example, to map \some_path\all under R:\ I make new key:

HKEY_USERS\< USER >\Network\R

with following values: enter image description here

such added drive is visible when I type

net use

in command line, but it's status is "Unavailable". It becomes "OK" after computer restart(and it's visible in Windows Explorer).

How can I achieve it without restarting computer? What process during restart changes drive status and makes it visible in Windows Explorer?

Or another approach: when i type add drive via:

net use R:\ \\some_path\all

it's immediately available in Windows Explorer and visible after net use command. What net use does beside adding new key to registry(as presented above)?

Upvotes: 0

Views: 1159

Answers (0)

Related Questions