Perform Uninstallation is not called from Install/Remove MSI
Posted: Thu Sep 20, 2007 2:43 am
Hi,
I need to execute a file before uninstallation starts so I put the run program statement in the Uninstall region:
This works fine when I uninstall my product.
But when I build a new setup and try to install the new one it calls
Which seems to be fine but this does not call “[DEFINE REGION: Perform Uninstallation]” from above.
I also tried to put “Run Program $TARGETDIR$\\bin\\MyInstall.exe /uninstall (WAIT)” in front of “Install/Remove MSI Package…” like
But my exe file is not executed.
How can I solve this?
Where do I need to put “Run Program $TARGETDIR$\\bin\\MyInstall.exe /uninstall (WAIT)” so that it is called either on Uninstall and on the automatic uninstall when installing a new version?
Greetings
Harry
I need to execute a file before uninstallation starts so I put the run program statement in the Uninstall region:
Code: Select all
[DEFINE REGION: Perform Uninstallation]
if Variable REMOVE Equals TRUE
Comment: Uninstall product
Comment: TO-DO: Insert any additional uninstall commands here
Run Program $TARGETDIR$\\bin\\MyInstall.exe /uninstall (WAIT)
Apply Uninstall (get result into variable SUCCESS)
This works fine when I uninstall my product.
But when I build a new setup and try to install the new one it calls
Code: Select all
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
Which seems to be fine but this does not call “[DEFINE REGION: Perform Uninstallation]” from above.
I also tried to put “Run Program $TARGETDIR$\\bin\\MyInstall.exe /uninstall (WAIT)” in front of “Install/Remove MSI Package…” like
Code: Select all
[DEFINE REGION: Install Application Pre-Requisites]
…
Display Dialog: progressprereq, use as progress dialog (non-modal)
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
Set Variable REMOVEOLD to
Set Variable ERROROLD to
Run Program $TARGETDIR$\\bin\\MyInstall.exe /uninstall (WAIT)
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
…
But my exe file is not executed.
How can I solve this?
Where do I need to put “Run Program $TARGETDIR$\\bin\\MyInstall.exe /uninstall (WAIT)” so that it is called either on Uninstall and on the automatic uninstall when installing a new version?
Greetings
Harry