sunil
sunil

Reputation: 1

How msi detect an installed application

i have created an application called "xyz.msi" and installed. Now i created another application called "abc.msi" and trying to install.

But my question is if "xyz.msi" is installed already then it shouldn't allow to install "abc.msi". Thanks in advance

Upvotes: 0

Views: 1845

Answers (2)

Christopher Painter
Christopher Painter

Reputation: 55581

Take a look at the Upgrade table. You can use this to define the search criteria along with the msidbUpgradeAttributesOnlyDetect attribute to cause your action property to be assigned the ProductCode property that is found. Then you can use your action property in the LaunchCondition table to prevent installation.

Upvotes: 2

Bravo11
Bravo11

Reputation: 918

You are asking how MSI detect an installed application. Its since each MSI will have a unique Product Code

(Refer to this: http://msdn.microsoft.com/en-us/library/windows/desktop/aa370854(v=vs.85).aspx)

whenever you try to install a product it looks up at the product code if it matches it lets you do the re installation or upgrade. if it doesn't it will not. Depends how you creating the MSI. There are lots of ways of creating this but not really sure if you application lets you view the properties or not.

Upvotes: 1

Related Questions