Jump to content

system environment variable


cezar
 Share

Recommended Posts

  • Developers

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

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

Link to comment
Share on other sites

  • Developers

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

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

Link to comment
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]

Link to comment
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.

Link to comment
Share on other sites

  • Developers

Setx.exe

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

<{POST_SNAPBACK}>

Thanks for the info... :lmao:

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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...