van_renier Posted November 13, 2006 Share Posted November 13, 2006 I'm using a script to install a program, which installs files to flder (possibly new install or possible upgrade of existing files), adds some services to the system, etc... Using EnvUpdate, though, appears to only update the OS environment with changes we've made, but does not update the AutoIt script as it's running. Spawning a new @COMSPEC (using Run/Runwait) doesn't work either, as those as just children of the original, and they inherit the ENV from the parent. Anyone know of a way that I can; Update a RUNNING Au3 script, with changes the installation of the program (that au3 is performing) has performed? (i.e. added new entries in the path statement, set new system variables, added services, etc...) EnvUpdate() is not working for this. Thanks for you time, effort, and thoughts, Van Link to comment Share on other sites More sharing options...
Bert Posted November 13, 2006 Share Posted November 13, 2006 what have you tried with code? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
van_renier Posted November 13, 2006 Author Share Posted November 13, 2006 what have you tried with code?Sorry... meaning what; adding code in my Au3 script?Or is 'code' a 3rd-party program?Van Link to comment Share on other sites More sharing options...
herewasplato Posted November 13, 2006 Share Posted November 13, 2006 ...EnvUpdate() is not working for this...Glance at this thread: http://www.autoitscript.com/forum/index.ph...showtopic=30299 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
van_renier Posted November 13, 2006 Author Share Posted November 13, 2006 Glance at this thread: http://www.autoitscript.com/forum/index.ph...showtopic=30299Thanks. Although, it's not what I wanted to hear... it does answer my question... sort of.(meaning I was hoping there was a way around this 'current' script ENV limitation.) That thread you referenced though, references the user's script(s) setting variables and such.My au3 is kicking off an external installation program, waits for the external program to finish then continues.After the external program finishes, the system has been updated with new values.Anyone know if there is a way to update the environment which the current au3 script is using?Kind of like a 'reverse' EnvUpdate() ; like Au3EnvUpdate()? (I guess this would involve, reading each existing SYSTEM variable in, and performing an EnvSet() for each one, so the current script could make use of the new environment/values, right?)Thanks again for your time effort and patience.Van Link to comment Share on other sites More sharing options...
herewasplato Posted November 14, 2006 Share Posted November 14, 2006 ...My au3 is kicking off an external installation program, waits for the external program to finish then continues...........At the point at which it continues, you could have the main script launch a secondary script. See AutoIt3ExecuteScript in this post: http://www.autoitscript.com/forum/index.ph...showtopic=22531This would only be worth doing if you did not have a lot of variables to pass to the new script. These variables could be passed via a file write/read or STDIO. Or (as you mentioned) it might be easier to "reading each existing SYSTEM variable in" to the original script.Or maybe others have a better work around..... Anyone? [size="1"][font="Arial"].[u].[/u][/font][/size] 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