View Full Version : Environmental Variables in NT or 2000
tmluke
02-22-2002, 10:27 AM
Is there a way I can edit the environment variable in windows NT or 2000? I got it figured out for Win 95/98/ME PC's (Autoexec.bat), but I'm having trouble with the Nt.
Thanks,
------------------
Darryl
02-22-2002, 03:55 PM
System Variables (environment variables available to all users of the
system) are set in:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contro l\Session
Manager\Environment
You just create a key with the name of the variable and the value is the
variable's value. NOTE: When setting variables in the Registry like this, the
system MUST be restarted for them to take effect.
So, for example, if I make a variable called "SUF60PROGRAM" and assign the
value of "C:\Program Files\Setup Factory 6.0 Demo\SUF60Design.exe" to it
and the restart the computer, I can go to Start > Run and type in
%SUF60PROGRAM% and Setup Factory 6.0 will start.
User variables (environment variables available to only the current user)
are set in:
HKEY_CURRENT_USER\Environment
registry key. They can be set the same way as above.
Here are some links for further reading:
http://www.winntmag.com/Articles/Index.cfm?ArticleID=5379
and
http://support.microsoft.com/support/kb/articles/q100/8/43.asp
------------------
Sincerely,
Darryl Hnatiuk
Indigo Rose Corporation
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.