I want to set environmental variables permanently through a batch file. Is there a command to set Permanent Environmental Variable (other than SETX) for Windows XP service pack 3?
command SETX JAVA_HOME="C:\java\jdk-1.4" is not supported in my machine. It is Windows XP service pack 3.
Answer
Per user settings command line:
% reg add KEY /v JAVA_HOME /t REG_SZ /d "C:\java\jdk-1.4"
For user only settings replace KEY with:
HKCU\Environment
For per machine settings replace KEY with:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
(Attention: there is a space in the last key, quote it with "
!)
No comments:
Post a Comment