I have an AI project for a hardware driver installer. Works fine.
It shall replace installer(s) based on InstallShield and NSIS.
In order to smoothly introduce AI I need to be able to "cross update" the driver.
Using the "Search" mechanism I look for the UninstallString of the older installers in the registry.
Properties: NSIS_MP and IS_MP32, IS_MP64.
Works fine. If such a package is found I need to uninstall it before installing the new driver.
In the Sequence of Custom Actions I put the CAs into InstallExecuteSequence | RemoveExistingProducts
Custom action: EXE with working dir,
with the condition NSIS_MP <> "" works fine although installation process continues."[NSIS_MP]" /S /UPDATE
Similar custom action: EXE with working dir,
with the condition IS_MP32 <> "" fails, although a logfile tells me that the action REMOVE_IS_MP has returned 1."[IS_MP32]" /qn
Invoking the uninstallstring in a cmd works fine. (UninstallString = MSIEXEC /X{<GUID>})
I suppose that the implicit MSIEXEC of the uninstallstring just returns immediately and quietly (without error) and does not wait until the former installer has been uninstalled.
I tried to change the custom action to
only opens MSIEXEC's help window, (==> something wrong with the call") but does not let me see the orignal command line."[SystemFolder]cmd.exe /C "START WAIT [IS_MP32] /qn /l* [APPDIR]remove.log"
Of course ALL these Custom Actions are of type "Synchronous, ignore exit code".
SO: HOW can I safely remove a package from within an installer?? Means process has to wait until uninstall has finished.
Any help appreciated.
Axel Mock
FOLLOW US
Get the latest news in Application Packaging