Login Script Doesn't Run

T

Thomas M

XP Pro SP2

I want to map a drive to a shared folder on another computer each time I
login. I have a .CMD file containing the following command:

net use Z: "\\<Computer Name>\<Shared Folder>" <Password> /user:Tom
/persistent:no

With the appropriate values substituted for <Computer Name>, <Shared
Folder>, and <Password> this works perfectly. The only problem is that
I cannot make it run when I login.

I went into the properties for the user account and entered the
following values:

Profile Path: C:\Documents and Settings\Tom
Login Script: Login.cmd

I put Login.cmd in the profile path folder. I thought that would cause
the login script to be run automatically when I log in, but the script
does not run. I tried naming the file Login.bat, I tried moving it to
the root of the drive, I tried putting the command in the Autoexec.bat
file. Thus far I have been unable to get it to run when I login. If I
run the file manually it works perfectly, so the problem is not with the
command. Clearly, there is something that I'm missing.

How do I get a login script to run automatically when I log in?

--Tom
 
T

Thomas M

Never mind. It occurred to me that maybe it could be done through a
group policy. I found the Logon policy for the user and added the file
to the list of scripts. The drive now maps when I login.

--Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top