cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
agshah
Level 6

Custom Action - Install Exec Condition question

Hi all,
I have InstallShield InstallScript MSI project. I added a custom action type 'Display error message and abort'.

Basically if the product is installed already then I want to display a message and abort the installation.

So for 'Install Exec Condition' I specified 'INSTALLED' thinking that this means product is installed and the
action will execute, display the error message I have specified and abort.

However, regardless of whether this product is installed or not, this action gets execute and install is aborting.

Is 'INSTALLED' not the right condition to use? Can you please advise what to specify in this case.
Labels (1)
0 Kudos
4 Replies
agshah
Level 6

Also, should I place the condition in the 'Install UI Sequence' or 'Install Exec Sequence'. Sorry new to this and
hence not knowing which sequence is appropriate.
0 Kudos
Dan_Galender
Level 10

You probably don't want to do what you're trying to do as displaying a message and aborting if the product is already installed means that once the product is installed, you won't be able to upgrade or remove the product. But to try and answer your questions, you probably want to use Installed and not INSTALLED and without knowing more, I'd think you'd want this to go in the Install UI Sequence.
0 Kudos
agshah
Level 6

thanks, I want to abort install if the product is installed already. But I do want users to be able to uninstall the product.
You mention I should use "Installed and not INSTALLED" ? Isn't this contradictory? Meaning I am saying Installed as well as NOT Installed ?

BTW, I want the custom action to be executed in the silent installs and uninstalls. So would placing it in 'Install UI Sequence' not work
for silent installs/uninstalls since they have no UI?
0 Kudos
Dan_Galender
Level 10

What I meant was that the property you are looking for is "Installed". In your original post you used an undefined property "INSTALLED". There is a difference--property names are case sensitive.

The reason I surmised that you wanted your action to be in the "Install UI Sequence" is that you said you wanted the action to display a message. You don't want to display messages in the "Install UI Execute" sequence because if you put the message there it will display if the user performs a silent (or unattended) installation.

I'd recommend you look into taking Flexera's "Learning MSI Projects Using InstallShield" class.
0 Kudos