Jump to content

Refresh Dos Variables?


Recommended Posts

I have a problem...

Try making this script

RunWait,setx ANEWVARIABLE ANEWSET,,hide
MsgBox,0,...,The ANEWVARIABLE set should contain " %ANEWVARIABLE% "

;But it doesnt :(

RunWait,setx ANEWVARIABLE "",,hide

If you start a %comspec% /k set command while the msgbox is there you'll see the set active...

Why cant I use it in autoit? There is a way to refresh the dos variables to use them?

Of course you need the SETX program.

Edited by ezzetabi
Link to comment
Share on other sites

For those who are not familiar with 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.

You can use SetX to set values for user and system environment variables from one of three sources: Command Line Mode, Registry Mode, or File Mode.

Webpage

Download

-----

And this won't run ???

RunWait, %COMSPEC% /C <Mypath>\\setx.exe <MyNewVariable> <MyNewSet>,,hide

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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