Steveh24
asked on
Cannot Disconnect Network Drives
I have a batch file that is supposed to delete an existing mapped drive and set a new one using the following commands, but it just will not delete the existing share and the only way I can do this is by going in to Windows Explorer and manually disconnecting the mapped drive.
Why won't it disconnect the mapped drive using the batch file, it has no problem actually mapping the drive.
Steveh24
@echo off
net use i: /delete /y
net use i: \\th-ex2k\IT
net use o: /delete /y
net use o: \\th-fs2k3\users\%username %
Why won't it disconnect the mapped drive using the batch file, it has no problem actually mapping the drive.
Steveh24
@echo off
net use i: /delete /y
net use i: \\th-ex2k\IT
net use o: /delete /y
net use o: \\th-fs2k3\users\%username
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was going to say that this didn't work, but something odd is happening, as I have removed the batch file from my AD profile, but when I log in to the server, my login script is still being executed and the drives are being mapped, I was expecting no login script to be executed and hence no mapped drives.
Any ideas ??
Any ideas ??
ASKER
Ok, I've worked out what is happening, it looks like our DC is taking a while to update itself after I make any changes to my User Account, but your solution to my original question is working fine and all mapped drives disappear if I remove my login script and reappear when I put it back.
Thanks for your help.
Thanks for your help.
ASKER
Steveh24