SetX Syntax |
|
Open Command Prompt |
SetX uses the following general syntax:
setx
setx Variable Value
setx machine compaq
setx machine "COMPAQ COMPUTER" /m
setx mypath %path%
setx mypath ~PATH~
setx Variable /f
FileName
The built-in delimiters are space, tab, carriage return, and line feed. Any ASCII character can be used as an additional delimiter. The maximum number of delimiters, including the four that are built in, is 15.
setx var /f ipconfig.out -x
setx ipaddr /f ipconfig.out /a 5,11
setx octet1 /f ipconfig.out /a 5,3 /d .
setx ipgateway /f ipconfig.out /r 0,7 "Gateway"
setx Variable /k
Hive\Key\...\Value
setx tzone /k
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInform
ation\StandardName
setx build /k
"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber"
Note