Batch File help!

Associate
Joined
27 Oct 2006
Posts
613
Location
Cotswolds, Nr Cheltenham
Hi all,

I need to create a batch file so I can get a Windows XP Home PC to connect to a Windows 7 Pro PC on boot up.

The details are:


Windows 7 Pro :

Computer Name : Nathan
User: nath
Password: gleneagle

I know it should be fairly simple but im a little stuck.

Thanks guys
 
Sorry,

I have a shared drive on the W7 PC but I cant connect to it until I go to \\nathan and input a user name and password.

Apparently a login.bat is the answer.

Thanks again
 
A batch file is simply a list of instructions, the same as you would type in manually at the command line, which are executed 1 after the other.

Simply create a file somewhere convenient, rename it to whatever.bat, open it in notepad, and type in the commands you use at the command line. Save and run to connect to the share.
 
this is what you want..

paste this into notepad



net use x: /d
net use x: \\Nathan\sharedFolderName /USER:nath gleneagle





Save that as 'foldermapped.bat' (not .bat.txt)

Dump it into the Start menu, Startup folder

Replace sharedFolderName with the name of the shared folder

This will map the drive to a virtual 'X:' drive in My Computer for you.




The /d switch will delete the old map when the pc starts up and create a new one (this is needed in XP home to refresh the password).
It will also allow you to connect to it via \\Nathan, since the password will be stored for that session.


Maybe put a link to the file on the desktop, so you can quickly re-run it if you ever need to
 
No problem

This used to drive me mad when I had one XP home machine that can't save passwords, so I knew exactly what you meant :D
 
Back
Top Bottom