mapping a drive using a batch file BUT hide the mapped drive within windows explorer
Posted on 2007-10-10
I have written a batch file as below:
net use U: \\<serveripaddress>\%username%$
if not exist U: goto logoff
if exist U: go to continue
Echo %username% "you are logged on else wher. Please log off at the other terminal before trying again"
(rest of script).
I am assuming that %username%$ is the name of the 2nd share ie bloggs$ that I have created and the above batch file is looking to use this share to map. The first share name would be bloggs.
Please can you tell me where I am going wrong in my batch file. I want to be able to map a drive but hide it when the user goes into windows explorer or my computer.