Discussion Locked

Mapped Drives Batch File

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone know what the correct syntax would be to edit a batch file to first del all the mapped drives and then connect them again. (XP logging into Server 2000 domain). The problem Im having is that when my client loggs on to his profile outside the network (succesfully establishing VPN)and tries to access his mapped drives, he gets an error saying "already in use" but has no access to the data on these drives?!? Help.

5 replies

by curlergirl

The command is:

net use * /d /y

Put this at the start of the login script file and it will delete all mappings. Then on the following lines put your net use drive mapping commands. That should work with Win2K and XP; note however that it will NOT work with earlier Win9x OS's.

Hope this helps!

by d'solve it

Hi,

Synergy/dlo's answer is correct but that command wil also remove the \\servername\IPC$ share.

I would recommend you to use a series of commands (one for specific share you want to delete and create). e.g.

net use //servername/sharename_1 /d /y
net use //servername/sharename_2 /d /y
....
net use //servername/sharename_1
net use //servername/sharename_2

Good luck

This discussion is closed to new replies.