cezar Posted February 10, 2005 Posted February 10, 2005 Anyone has a script that will set system environment variable and will persist until logoff or reboot. This is for Windows XP/2000. Thanks
Developers Jos Posted February 10, 2005 Developers Posted February 10, 2005 Anyone has a script that will set system environment variable and will persist until logoff or reboot. This is for Windows XP/2000.Thanks<{POST_SNAPBACK}>Check out EnvSet() and EnvUpdate() in the helpfile ... (and maybe also check the forum purpose... these kind of posts fit into the :v3 SupportHelp and scripting advice for AutoIt v3. ) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
this-is-me Posted February 10, 2005 Posted February 10, 2005 You can use the commandline setx to do that. Who else would I be?
Developers Jos Posted February 10, 2005 Developers Posted February 10, 2005 (edited) You can use the commandline setx to do that.<{POST_SNAPBACK}>@this-is-me, is this a typo or a separate program "setx" ?Because afaik the commandline Set command won't work because that changes made only last till the CMD/Command box is closed... Edited February 10, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
gosu Posted February 10, 2005 Posted February 10, 2005 Wrong forum. [quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote]
Developers Jos Posted February 10, 2005 Developers Posted February 10, 2005 Wrong forum.<{POST_SNAPBACK}>Echooooooooooo SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
MHz Posted February 10, 2005 Posted February 10, 2005 @this-is-me, is this a typo or a separate program "setx" ?Because afaik the commandline Set command won't work because that changes made only last till the CMD/Command box is closed...<{POST_SNAPBACK}>Setx.exeThis command-line tool offers a batch method for setting environmental variables in the user or system environment and requires no programming or scripting. In addition to taking an environmental variable and its associated value from the command line, it can also get the values of registrykeys and write them to text files.SetX provides the only command-line or programmatic way to directly set system environment values for Microsoft Windows 2000. System environment variables are manually configureable through Control Panels or through a registry editor (Regedit or Regedt32). The SET command, which is internal to the command interpreter (Cmd.exe), sets only user environment variables for the current console window.
Developers Jos Posted February 10, 2005 Developers Posted February 10, 2005 Setx.exeThis command-line tool offers a batch method for setting environmental variables -snip-<{POST_SNAPBACK}>Thanks for the info... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
cezar Posted February 10, 2005 Author Posted February 10, 2005 Thank you for your replys. I thought "setx" is only for Windows NT but I guess not. I will try to play with setx later today. Sorry I posted in the wrong forum.
this-is-me Posted February 11, 2005 Posted February 11, 2005 Hey, sorry for late reply, but I guess you figured it out. Who else would I be?
JerryD Posted February 11, 2005 Posted February 11, 2005 Under XP (and I assume 2K/NT), User environment variables are stored in the registry key:HKEY_CURRENT_USER\EnvironmentSystem environment variables are stored under:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\EnvironmentJerry
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now