Cleaning Disconnected Network Drives

I have an application that requires connecting to remote windows. What I did was use the mapped drive to create the connection in the Windows start menu. Partial codes are as follows:

 @IF NOT EXIST \\remotePC\sharedFolder NET USE * \\remotePC\sharedFolder /USER:user1 pwd /PERSISTENT:YES

The network use card is working fine. The displayed drive will be one of the available letters on the network drive. My application uses the name UNC (\ remotePC \ sharedFolder) instead.

The problem (not sure if this is the problem) is that after several reboots, I see a list of disabled drivers from Explorer:

enter image description here

, , ? . script? , , .

NET USE T: /DELETE

: , /PERSISTENT: YES. , . . "". , . . , Windows. ?

. 10 , , . Total Commander:

enter image description here

, . . net/delete:

NET USE X: /DELETE

. , , 1) 2) my script . , , - , ():

IF NOT EXIST Y:\ NET USE \\remotePC\Shared...

Y: . - . cmd, .

, script, . -: , . - script , , script, ?

+3
1

, . script yes to persistent no:

NET USE * \\remotePC\sharedFolder /USER:user1 pwd /PERSISTENT:NO

, Windows ( , ). , , . .

, , .

+3

All Articles