View Full Version : Ignore application already installed (don't install if already exists)

12-10-2009, 06:00 PM

I am currently working on an installshield project (basic msi project). The installer needs to check if these applications (third party softwares) are already installed at the destination computer. If they are, then ignore and go on with install.
This is what I did so far:

In System Search, I search for the registry key folder (\\HKEY_LOCAL_MACHINE_....) of the applications and store them in a property for use in condition.

Ex. Application MyApp

System search for registry folder with name MyApp. Put this in property (that I defined in property manager) call MyApp.

Now, in my custom action (this custom action calls an exe to run setup for application MyApp) has the following condition defined: MyApp<> 0

So, this means, if MyApp is not found, then install. If it is found, ignore.

It seems to be doing the latter just fine. But if the application MyApp was indeed not there... it is not running the setup to install MyApp.
Can anyone help me...why it won't install MyApp. I looked through the registry and removed all key registry having MyApp.

This is my first post (and no doubt will have more posts).... so please help if u can. Thank You!!

12-10-2009, 08:57 PM
Hi Kelly,

Your condition should look like 'Not MyApp'.


12-10-2009, 09:23 PM
Hi Alpesh,

I did what you told me, but it didn't seem to work.

Conditions: NOT MyApp

But it would still not install. I think because I am doing an upgrade, not initial install... but I am upgrading with the same version (ex. So, I think I have to increment the version, with the condition above, then try to upgrade. Maybe this would work. I am going to try that...and willl let you know.
Thanks so much for the help!!

12-11-2009, 06:03 PM

My above problems seems to be OK, for now :)

I have another issue I can't seem to resolve. I am hoping someone can help (is this forum here the best forum to get lots of replies??). Anyway, I have defined some custom action. Ex. custom action = Writetofile.js (this java script is used to write a string to a file at destination). If user is upgrading the software, I don't want this action to run. How do I set it?
The "NOT Installed" option is used to make sure it only runs on initial installation only. But if someone were to upgrade... I won't know what else needs to be set. What is recommended? Please advise...


12-16-2009, 04:29 PM
If the package is being run as a Major Upgrade, the property [IS_MAJOR_UPGRADE] will be set. If the package is being run as a minor upgrade, the property...wait for it...can you guess?... that's right! [IS_MINOR_UPGRADE] will be set.

PS: Please do yourself a favor and make sure you are familiar with the help topics "Major Upgrade vs. Minor Upgrade vs. Small Update", "Upgrade Considerations" and "Upgrades View" preferably in that order. You'll be glad you did.