cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
DBH1985
Level 4

check if the product is installing or uninstalling?

I'm working on a product that has the install section and uninstall section that both use the same dialog. The only problem is that this dialog needs to behave slightly differently depending on if its uninstalling or installing. Is there a method I can run to check which state the system is in?

I was looking at the methods
getUninstallerStatus()
uninstallerLauncherExists()

and the classes
ProductInstallContext
ProductUninstallContext
InstallCheck

But these are all uncommented or confusingly commented in the API. Can I use one of these and if so how? Or will I have to create another dialog altogether?
Labels (1)
0 Kudos
(1) Reply
enanrum
Level 9

It would be nice if the Dialogs had an onInstalling or onUninstalling as the InstallScript class does inthe Events view - but no.

I'm not sure of the InstallShield method but I can give you a cheap way of doing it. You can use the 'Set Variable' wizard action in the sequence prior to showing the dialog in both Installation/Uninstallation Sequence.

Something like INSTALLING = true/false then in the dialog you can:

String INSTALLING - arg0.resolveString("$V(INSTALLING)");
if (INSTALLING.equalsIgnoreCase("true") ) {
// Installing product
} else {
//Un installing product
}

Regards,
Tom
0 Kudos