Your syntax is at variance with the example given by setx /?:
Command Line Mode: setx variable value [-m]
Optional Switches:
-m Set value in the Machine environment. Default is User.
a) You inserted an "=" where no "=" can exist.
b) You omitted the "-m" switch.
Kevin said:
@echo off
setx=path %path%;l:\apps\wangbat
:
@echo off
path %path%;l:\apps\wangbat
:
Please quote the exact line from your logon script.
I have the resource kit and it is installed.
So using the setx, what is the correct entry into my login
script
now? I
tried putting the setx into the script and it says it is not a recognized
command.
:
As I said, setx.exe comes with the Win2000 Resource Kit.
You must purchase the kit, install it, then refer to setx with
a fully qualified address, eg.
"c:\program files\Windows 2000 Resource Kit\setx.exe".
To see the proper syntax, type
"c:\program files\Windows 2000 Resource Kit\setx.exe" /?
Sorry about the misinformation. So using the setx, what is the
correct
entry
into my login script now? I tried putting the setx into the script
and it
says it is not a recognized command.
:
In your original post you said that you wanted to set the path
during the logon script. This is exactly what the "set" command
does:
It sets an environmental variable while the logon script
runs.
When
that process finishes, the settings are lost.
If you want the settings to persist then you must use setx.exe.
It comes with the Win2000 Resource Kit. Any variable set by
setx will be available to all processes that are launched
***after***
the execution of setx.
Ok, I see it doing it in the login script but when I
goto a
dos
prompt
and
type in path, it is not there. How do I get it to
append to
my
existing
path
and save it?
:
Hello. I am trying to have a path set for users
during
the
login
script.
I
need to set a drive that does the same thing as the novell
search
drive.
Please help.
Insert this line in your logon script to include e:\YourTools in
the
path:
@echo off
path %path%;e:\YourTools