Vanishing Path Setting

  • Thread starter Thread starter Don Bouchard
  • Start date Start date
D

Don Bouchard

I should know better, but something is just not working
right. Have Win2003 Server as a domain controller. Have
a logon.bat file in sysvol\domain\scripts directory (know
this works due to pause statements in it) In addition to
defining net shares, I also want to add one of the
network shares (T:\ - tools directory) to path variable.
Code is as follows:

rem net use statements above
path
pause
path %path%;t:\
pause

exit

After 1st pause, of course, path is std. win default.

After 2nd pause, of course, it has additional directory
added correctly.

logon.bat file ends, and I then open a command prompt on
same system and path is minus the t:\ variable! What am
I doing wrong??? It seems like I've done this thousands
of times just fine. Checked KB, FAQs, etc. and nothing
there. Any help would be most appreciated.

Thanks!
 
You're setting the path in the window that the login script is running.
Once the login script is done, it closes the window and there goes you PATH!
 
I understand that in WindowsXP, the path settings are
written to the registry and are therefore permanent. How
else does one set a path in a logon script file?????
 
How many machines do you have to set it up for?

Don Bouchard said:
I understand that in WindowsXP, the path settings are
written to the registry and are therefore permanent. How
else does one set a path in a logon script file?????
 
Many machines, but that's not the info I'm looking for.
I know I can go on each machine and force the path to
include the T:\ drive, but that doesn't explain why what
is the most common way to set path variables via logon
scripts isn't working for my configuration. Moreover, if
I set it on each machine, the next time I want to change
the path variable, I will need to once again go around to
each machine and make the changes. I want to be able to
set it via the logon.bat file.

Thanks for your help.
 
Back
Top