Jump to content

Recommended Posts

Posted

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.

Posted

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?

Posted (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 by jguinch

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
  • Recently Browsing   0 members

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