sabu Posted April 15, 2007 Share Posted April 15, 2007 Friends, I am setting an environment variable using the EnvSet function followed by the EnvUpdate function. This does not set the environment variable permanently. When I come out of the AutoIt script, the variable retains its original value. How can I permanently set the environment variable from within the AutoIt script?Sabu Link to comment Share on other sites More sharing options...
eltorro Posted April 15, 2007 Share Posted April 15, 2007 According to the help file: A environment variable set in this way will only be accessible to programs that AutoIt spawns (Run, RunWait). Once AutoIt closes, the variables will cease to exist. So I assume that returning to it's original value also is true. Without using control panel, it would require reg changes to make the variables permanent: <code>;system variables HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment ;User variables </code><code>HKEY_CURRENT_USER\Environment</code> see here. Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code Link to comment Share on other sites More sharing options...
sabu Posted April 18, 2007 Author Share Posted April 18, 2007 According to the help file: So I assume that returning to it's original value also is true. Without using control panel, it would require reg changes to make the variables permanent: <code>;system variables HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment ;User variables </code><code>HKEY_CURRENT_USER\Environment</code> see here. Thanks, eltorro. Regards. Link to comment Share on other sites More sharing options...
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