cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
antonioeri
Level 3

check on product already installed doesn't work!

Hi all,
this is my first message in this forum and I've a problem with installshield 11.5. The problems seems to be very easy to solve but my solution does not work! 😞
I want to be sure that if the product is alreay installed on the target machine where I'm launching the bin for the installation, the installation itself must be stopped, with a message error to the user.
I've created a check dialog with condition "installedProductCondition" with properties set as below:
evaluate = must be met
immutable = false
check names = patch
include = true

In the dialog the next button is is disabled on "initializeUI" event.

But even if the product is already installed nothing happens and the dialog is not showed, so the installation proceed when it should be stopped.
What i've done wrong??
Labels (1)
0 Kudos
(7) Replies
preethi_mohan
Level 3

Hi,

I'm facing the same problem as Antonioeri; The installer doesnt detect an existing instance of the same product. Please suggest a way out.
0 Kudos
toogoodju
Level 4

I believe there are two ways to do this.

1. You can create a registry key in the win32 registry. Then create a new dialogue before the welcome dialogue that has a condition that checks whether or not the registry key exists. If it does exist, the dialogue will be displayed telling the user the product is already installed. If it does not exist, the dialogue be skipped.

2. Create a custom wizard action that looks in the vpd and checks if the uid of the product exists. This is probably tougher to do than the above method.
0 Kudos
antonioeri
Level 3

Hi,
the problem is that when the product is installed in the VPD the uid is not present and this is very strange. I don't know the reason!
Any way I've solved checking the presence in a directory of a file that is present with installed product, and not present anymore after uninstallation.

Thanks for your help.
0 Kudos
preethi_mohan
Level 3

Hi toogoodju,

Thank you for the suggestions.

Option 1 will solve the problem for Windows only. But we are looking for a common way of checking on all platforms (Linux, AIX, Solaris, OS400 and Windows).

Option2, vpd information is stored in HSQL database in ISMP 11.5. I looked for some apis within ISMP to query it, but could not find any. Please correct me if I am wrong here.

Thank you,
Preethi Mohan
IBM
0 Kudos
RobertDickau
Flexera Alumni

The RegistryService (not Win32RegistryService) is used to interact with the VPD registry (there's also LegacyRegistryService for the pre-MultiPlatform 10.5 VPD registry); searching these forums or the web site for "AlreadyInstalledCondition" will turn up at least one example...
0 Kudos
toogoodju
Level 4

-the problem is that when the product is installed in the VPD the uid is not present and this is very strange. I don't know the reason!

Are you hardcoding the uid into the code? If not, then in your code you will need to call the WizardServices object and from that call the resolveString method like wizard.resolveString("$P(" + beanId + ".key.UID)"); To get beanID, you will need to create a getFoo and setFoo function. setFoo takes a string and will set beanID to whatever is passed in. getFoo will return beanID.

Now in the welcome dialogue in the IDE, add the "alreadyinstalled" condition that you have just created. When you edit it, Foo should appear as a variable, all you have to do is set the root bean of your project as its value.

This works if the class you made extends WizardbeanCondition.
I believe you will need a hotfix for wizard.resolveString("$P(" + beanId + ".key.UID)"); to work.
0 Kudos
rmackay
Level 7

The built in 'check installed' thing doesn't work very well at all. You are better off writing a custom action yourself where the only property you check is the UUID of the product. Inside that action you can get all sorts of other information like version, where installed, etc.

See the "Already Installed Condition" here: http://www.installshield.com/downloads/beans.asp?prod=mpf
0 Kudos