Quantcast
Channel: Flexera Community Forums
Viewing all articles
Browse latest Browse all 4553

LaunchAppAndWait with msiexec doesn't wait

$
0
0
Hi All

I have Basic MSI Project where I am trying to uninstall previous version of the product that was created by different developed.

I was thinking using msiexec since it seems to work fine from command line.

I created InstallScript function and set it to:

Synchronous (Check exit code)
Immediate Execution
Always execute
After File Cost

HTML Code:

function UninstallSilently(hMSI)
        NUMBER nResult;

begin
       
        if(LaunchAppAndWait("msiexec", "/uninstall {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} /passive", WAIT | LAAW_OPTION_WAIT_INCL_CHILD) < 0)then
                MessageBox ("Failed to uninstall",SEVERE);

        endif;
       
end;

I can see that it starts uninstalling previous product, but it exits before it's done uninstalling.

So my question is how to make sure that LaunchAppAndWait will wait for product uninstall and then continue?

Or if you have better way to uninstall previous product I will be happy to hear it.


Thank you in advance.

Viewing all articles
Browse latest Browse all 4553

Trending Articles