China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-22 02:15
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Environment Variables] setx.exe extracted from the WinXP SP2 support tool kit View 1,833 Replies 6
Original Poster Posted 2007-03-21 06:59 ·  中国 河北 石家庄 电信
初级用户
Credits 99
Posts 41
Joined 2007-02-19 03:42
19-year member
UID 79773
Gender Male
Status Offline
setx.exe extracted from the WinXP SP2 support tools package

http://zhenlove.com.cn/cndos/fileup/files/setx_xp.zip

Used to set global environment variables.
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
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"}
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.

For more information and example use: SETX -i
Recent Ratings for This Post ( 2 in total) Click for details
RaterScoreTime
lxmxn +2 2007-03-27 00:34
everest79 0 2007-03-27 03:48
量子公民
Floor 2 Posted 2007-03-27 00:35 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
19-year member
UID 59080
Status Offline

Downloaded and bookmarked~ Any other good stuff?~~
Floor 3 Posted 2007-03-29 09:27 ·  中国 上海 闵行区 电信
新手上路
Credits 12
Posts 6
Joined 2007-03-14 02:41
19-year member
UID 81650
Gender Male
Status Offline
It's useful. Downloaded it. Thanks to the LZ for being generous
Floor 4 Posted 2007-04-14 09:41 ·  中国 湖南 衡阳 电信
新手上路
Credits 15
Posts 6
Joined 2007-01-03 03:14
19-year member
UID 75302
Gender Male
Status Offline
Good stuff, saved it
Floor 5 Posted 2008-04-10 15:03 ·  中国 广东 深圳 电信
初级用户
Credits 34
Posts 13
Joined 2006-07-20 19:11
19-year member
UID 58929
Gender Male
Status Offline
You can only add or change, but cannot delete the added variables.
Floor 6 Posted 2008-04-11 04:46 ·  中国 上海 联通
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
What are the differences between this tool and directly writing to the registry?
Floor 7 Posted 2008-10-12 17:25 ·  中国 北京 鹏博士BGP
新手上路
Credits 2
Posts 1
Joined 2008-10-12 16:59
17-year member
UID 128173
Gender Male
Status Offline
Not bad, I'm urgently looking for it, heh heh






Originally posted by airosp at 2007-3-21 06:59:
setx.exe extracted from the WinXP SP2 support tools package

http://zhenlove.com.cn/cndos/fileup/files/setx_xp.zip

Used to set global environment variables.
SETX: This program is used to set val ... 
Forum Jump: