wmic shows different persistent flag for net use remote drive than it was actually created with

1

I added some remote drives on my NAS to my laptops system by invoking:

net use \\someserver\ /user:any "anyKey" /PERSITENT:YES

To get access to these remote drives, as I didn't assign a letter for the drives, I created links and access them as regular Folders on my local drive

mklink /D localdrive\remotedrive\C \\someserver\c$

Sometimes some drives lose their "connection" while others don't. Windows simply can't resolve them anymore. So I created a skript that I run and with which I reconnect all drives.

This is really annoying so I started investigating. From:

wmic netuse get /value

I received the result:

AccessMask=1179785
Caption= ...
...
Name=\\someserver\
Persistent=FALSE
...
Status=OK
UserName=any

This kind of confirms my "suspicion" that those remote drives aren't added persistently. Any suggestions what I can do now?

aldr

Posted 2019-10-25T12:48:42.523

Reputation: 133

No answers