I want to be able to connect to a (wifi) network hard drive from my laptop, but only occasionally. If I use the "Map a network drive" command in WinXP explorer, I have to put in the drive's IP address and name, then the router name and its password. Too much to remember!
I'm looking for a way of scripting this activity (in any language), something like:
map Z: \\10.0.1.1\DRIVENAME "ROUTERNAME\PW"
I don't particularly care what language the script is written in. BTW, I'm aware of the DOS 'subst' command, but I don't think I can use that in this case because of the password protection.
Best Answer
use the
net use
command:Edit 1: Also, I believe the password should be simply appended:
You can find out more about this command and its arguments via:
Edit 2: As Tomalak mentioned in comments, you can later un-map it via