Thursday 11 October 2018

script - Set Permanent Environmental Variable in Windows XP


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

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...