Archived from groups: microsoft.public.windowsxp.general (
More info?)
setx.exe is also part of Windows Support Tools.
Windows Support Tools is on the XP CD.
Drive letter:\SUPPORT\TOOLS
Along with many useful tools built into the Windows operating system, over
40 additional Support Tools are included on the Windows CD.
To install Windows Support Tools
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/tools_howto.mspx
Windows Support Tools
http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/windowsxp/home/using/productdoc/en/tools_overview.asp
Using the Windows XP support tools
http://support.microsoft.com/default.aspx?scid=%2fdirectory%2fworldwide%2fen-gb%2futility.asp
Windows XP Service Pack 2 Support Tools
http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38&displaylang=en
--
Hope this helps. Let us know.
Wes
MS-MVP Windows Shell/User
In news:%23lLTefzpFHA.720@tk2msftngp13.phx.gbl,
News Reader <stealth@null.net> hunted and pecked:
> User specific environment variables can be set from My computer ->
> properties -> advanced -> environment variables. But when you want to do
> it from script, you need another way. You could perhaps create a script
> and make shortcut to start menu -> propgrams -> startup. Use folder
> C:\Documents and Settings\All Users\Start Menu\Programs\Startup, if you
> want to make it availabe for all users.
>
> Anyway, don't use simple set command in script. Instead, get windows
> resource kit, which has setx.exe. With it you can set environment
> variables from scripts so that those settings are visible also outside of
> the executing script. here is setx help:
>
> c:\>setx /?
>
> SETX: This program is used to set values in the environment
> of the machine or currently logged on user using one of three modes.
>
> 1) Command Line Mode: setx variable value [-m]
> Optional Switches:
> -m Set value in the Machine environment. Default is User.
>
> 2) Registry Mode: setx variable -k hive\key\...\value
> Optional Switches:
> -m Set value in the Machine environment. Default is User.
>
> 3) File Mode: setx variable -f file {-a x,y | -r x,y "string"} [-d d] [-x]
> [-m]
> Required Switches:
> -f file : Specify file name to use.
> -a x,y : Specify absolute coordinates and offset.
> -r x,y "string" : Specify coordinates and offset relative to string.
> Optional Switches
> -d ,:\ etc. : Specify additional delimiters.
> -x : Displays file coordinates. Switches -a -r -e ignored!!
> -m : Set value in the Machine environment. Default is User.
>
> SETX Examples:
> --------------
> To view the examples screen best set the width of your command window to
> 100.
>
> For the file type examples you must first create the file that you wish to
> parse by using "command > filename" ie ipconfig > ipconfig.out.
>
> IMPORTANT: SETX writes variables to the master environment in the
> registry. Variables set using SETX are only available in future command
> windows and not in the current command window.
>
>
>
> SETX Command Line Examples:
> --------------------------
> SETX MACHINE COMPAQ
> Sets value of MACHINE to be COMPAQ in the users environment.
>
> SETX MACHINE "COMPAQ COMPUTER" -m
> Sets value of MACHINE to be "COMPAQ COMPUTER" in the machine environment.
>
> SETX MYPATH %PATH%
> Sets the value of MYPATH to the CURRENT value of the PATH environment
> variable.
>
> SETX MYPATH ~PATH~
> Sets the value of MYPATH to ALWAYS be equal to the value of the PATH
> environment variable even in the event that the PATH variable changes.
>
>
>
> SETX Registry Examples:
> -------------------
> SETX TZONE -k
>
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInforation\Stand
ardName
> Sets the value of TZONE to the above key ie. "Central Standard Time"
>
> SETX BUILD -k "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
> NT\CurrentVersion\urrentBuildNumber"
> Sets the value of BUILD to the current Windows NT build ie. "1314"
> Note: Quotes must be used because of the embedded space in "Windows NT".
>
>
>
> SETX File Examples:
> -------------------
> SETX VAR -f ipconfig.out -x
> Displays the coordinates for the contents of the file "ipconfig.out".
>
> SETX IPADDR -f ipconfig.out -a 5,11
> Finds value at absolute offset 5,11 of the file ipconfig.out
> Sets IPADDR to the IP Address (absolute offset 5,11)
>
> SETX OCTET1 -f ipconfig.out -a 5,3 -d .
> Finds value at absolute offset 5,3 and uses "." as an additional
> delimiter. Sets OCTET1 to the first octet of the IP Address
>
> SETX IPGATEWAY -f ipconfig.out -r 0,7 "Gateway"
> Finds value at relative offset 0,7 to the keyword "Gateway"
> Sets IPGATEWAY to the first octet of the IP Address
>
>
> SETX: Version 1.0a (5/31/96)
> Gary Milne - Microsoft MCS
>
>
>
>
> "Salad" <oil@vinegar.com> wrote in message
> news:ZflOe.63$z2.4@newsread3.news.pas.earthlink.net...
>> How can I set DOS environment variables upon logging into Windows or the
>> network. Currently the environment variables are being set in the
>> autoexec.nt batch file but they are global for all users...ex:
>>
>> SET FULL_NAME=JOE BLOW
>> SET LOGIN_NAME=JOE
>>
>> I would like to set the user's login name and full name and a couple of
>> other settings. I noticed that USERNAME is a setting when I enter SET
>> from the DOS command line.
>>
>> Should I create a batch file in the autoexec that calls a batch file in
>> the user's profile directory based upon the USERNAME?
>>
>> This was easy for me to do with Novell since there was a User login
>> script that was executed upon logging in. Is there something similar in
>> WinXP?