blumi Posted September 12, 2014 Share Posted September 12, 2014 I did some tries with uninstall strings but not very successful. I tried to run an uninstall and to wait until it is finished to install after that another version/programm. Local $iPID = Run('"C:Program Files (x86)InstallShield Installation Information{ADC55813-F4DD-47AA-94F3-CA35E1447E26}setup.exe" -runfromtemp -l0x0407 -removeonly') MsgBox(64, $ScriptName, "PID: " & $iPID) When I run this, the msbox appears immediately and not after the uninstall is finished. The uninstall string starts another installer it seems with another PID. When I take a look in the taskmanager and search for the PID from the script return I don't find it. How to handle this? Any ideas? Thank you. Link to comment Share on other sites More sharing options...
UEZ Posted September 12, 2014 Share Posted September 12, 2014 Try RunWait instead.Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
blumi Posted September 16, 2014 Author Share Posted September 16, 2014 Same with Run or RunWait Found this in the help from RunWait Some programs will appear to return immediately even though they are still running; these programs spawn another process - you may be able to use the ProcessWaitClose() function to handle these cases. Any ideas? Link to comment Share on other sites More sharing options...
jguinch Posted September 16, 2014 Share Posted September 16, 2014 (edited) The uninstall string starts another installer it seems with another PID. So, do you know the 2nd process name ? You can also search for the child process with _WinAPI_EnumChildProcess #include <Array.au3> #include <WinAPIProc.au3> Local $iPID = Run('"C:\Program Files (x86)\InstallShield Installation Information\{ADC55813-F4DD-47AA-94F3-CA35E1447E26}\setup.exe" -runfromtemp -l0x0407 -removeonly') ProcessWaitClose($iPid) Local $aData = _WinAPI_EnumChildProcess($iPId) _ArrayDisplay($aData, '_WinAPI_EnumChildProcess') Edited September 16, 2014 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF 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