Sign in to follow this  
Followers 0
cezar

system environment variable

11 posts in this topic

Anyone has a script that will set system environment variable and will persist until logoff or reboot. This is for Windows XP/2000.

Thanks

Share this post


Link to post
Share on other sites



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 ... :lmao:

(and maybe also check the forum purpose... these kind of posts fit into the :

v3 Support

Help and scripting advice for AutoIt v3. )


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You can use the commandline setx to do that.


Who else would I be?

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

@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.exe

This 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.

Share this post


Link to post
Share on other sites

Setx.exe

This command-line tool offers a batch method for setting environmental variables -snip-

<{POST_SNAPBACK}>

Thanks for the info... :lmao:

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Hey, sorry for late reply, but I guess you figured it out.


Who else would I be?

Share this post


Link to post
Share on other sites

Under XP (and I assume 2K/NT), User environment variables are stored in the registry key:

HKEY_CURRENT_USER\Environment

System environment variables are stored under:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

Jerry

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0