| Author |
Set Environment Variable From CMD Prompt
|
James Ellis
Ranch Hand
Joined: Oct 14, 2004
Posts: 205
|
|
For various reasons I need to be able to set an environment variable from DOS and have that value still be present when the machine is rebooted. Using the "SET" command the value is only valid for the open DOS window. Anyone know how to do this? PS - I know about Control Panel/System/Advanced Tab...I need to do it through DOS/CMD Prompt. Thanks, Jim
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Windows used to use a file called 'autoexec.bat' for setting environment variables. They stopped shipping it in newer versions but I think the OS still looks for it and runs it, if it's there. I believe it looks in 'c:\'
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
I don't see why you couldn't put your own batch file in the startup folder either... If you get it working, report back with you you did it.
|
 |
James Ellis
Ranch Hand
Joined: Oct 14, 2004
Posts: 205
|
|
I believe the way I'm going to handle it is to try and set these variables through the InstallAnywhere script that will install the program. I'll let everyone know if I think of another way to do this. Thanks, Jim
|
 |
 |
|
|
subject: Set Environment Variable From CMD Prompt
|
|
|