cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Vijeshollithodi
Level 2

Custom Action - New EXE

Hi,

In a MSI(abc.msi), I'm using a custom action for calling an EXE(xyz.exe).

Following are the properties i set for the custom action:
Return Processing : Asynchronous(waits) , In-Script Execution :Immediate Execution , Execution Scheduling : Always Execute, Install UI Seq : After Cost Finalize , Install UI Condition:Not Installed.

Here when i unistall abc.msi, as per my requirement, i'm not uninstalling the xyz.exe. Now when i try to install the abc.msi again on the same box, xyz.exe while take to the maintainence dialog.

How can i put a condition to skip the xyz.exe calling custom action, if xyz is already installed. XYZ is basically an external installer which has product code, version and all.

Please advise.
Labels (1)
0 Kudos
(1) Reply
WalterT
Level 4

First a little tip. If you plan to use an MSI to install another executable and repackaging is not an option(convert that exe to an MSI), then I advise you to install it as a prerequisite using InstallShields prerequisite editor.

Now to answer your question. In order to check if your app is installed you need to do a system search (happens earlier in the sequence than your custom action) wherein you check for a file or a registry value that always is there if your application is installed. This stores the path of the value in a property which you get to set in the last step of the system search dialog. Use a PUBLIC property, say SEARCHFORAPPNAME. Make sure this property is not in your property manager or if it is it has an empty value.

You then have a property which you can add to your current condition making it: If Not Installed AND Not SEARCHFORAPPNAME.

This will work, but I'd go for the repackaged solution or the prerequisite solution.

Walt
0 Kudos