Batch File to Connect to Mapped Drives

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Batch File to Connect to Mapped Drives

Post by jstevens »

I have a number of network mapped drives that do not connect automatically when I work remotely with a VPN connection.

What I would like to do is create a batch file that would connect each mapped drive. I can double-click each mapped drive to connect but am looking for a batch file solution.

Regards,
John
Regards,
John

User avatar
John Gray
PlatinumLounger
Posts: 5434
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Batch File to Connect to Mapped Drives

Post by John Gray »

net use <x>: \\<servername>\<sharename> /p:<n>

Change all variables to suit, duplicate appropriately.
Check whether the BATch file has to be run as Administrator...

I do all this stuff in a Logon Script - YMMV!
John Gray

If you are having problems with solitude, you are not alone.

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Batch File to Connect to Mapped Drives

Post by jstevens »

John,

Thanks for the suggestion. I was able to connect to all my mapped drives.

Regards,
John
Regards,
John

User avatar
John Gray
PlatinumLounger
Posts: 5434
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Batch File to Connect to Mapped Drives

Post by John Gray »

Excellent!
John Gray

If you are having problems with solitude, you are not alone.