setx命令在windows xp中有效吗? 我尝试在批处理文件的帮助下,在WindowsXP中使用setx设置javahome。但它不起作用

setx命令在windows xp中有效吗? 我尝试在批处理文件的帮助下,在WindowsXP中使用setx设置javahome。但它不起作用,windows,batch-file,command,windows-xp,Windows,Batch File,Command,Windows Xp,setx在windows xp sp3中工作吗?以及如何在xp中以管理员身份运行命令提示符 SETX不是本机windows XP命令,但它随windows XP Pro的支持工具CD一起提供 在命令行中尝试SETX/?,并阅读联机帮助 使用RUNAS命令以管理员权限运行程序。看 要以管理员权限启动命令提示符,RUNAS/user:HERO cmd.exe setx下载页面:。命令行语法:SS64:永久设置环境变量,setx可用于设置计算机(HKLM)或当前登录用户(HKCU)的环境变量 s

setx在windows xp sp3中工作吗?以及如何在xp中以管理员身份运行命令提示符

  • SETX
    不是本机windows XP命令,但它随windows XP Pro的支持工具CD一起提供

    在命令行中尝试
    SETX/?
    ,并阅读联机帮助

  • 使用
    RUNAS
    命令以管理员权限运行程序。看

    要以管理员权限启动命令提示符,
    RUNAS/user:HERO cmd.exe


  • setx

    下载页面:。
    命令行语法:
    SS64:永久设置环境变量,setx可用于设置计算机(HKLM)或当前登录用户(HKCU)的环境变量


    setx
    帮助消息:

    @echo off
    SETX -m JAVA_HOME "C:\Program Files\Java\jdk1.6.0_31"
    pause
    

    问题没有解决。这就是为什么接受答案是悬而未决的。安装后,支持工具是否会在注册表中创建条目?@BobbyRachel扫描注册表不是问答的一部分。增加问题是违反SO规则的,你必须提出一个新问题。@BobbyRachel为方便起见添加了一些有用的信息:) 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\TimeZoneInformation\StandardName Sets the value of TZONE to the above key ie. "Central Standard Time" SETX BUILD -k "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber" 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