Community Forums
Results 1 to 5 of 5

Thread: Custom Action - Install Exec Condition question

  1. #1
    Join Date
    Aug 2015
    Posts
    60

    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.

  2. #2
    Join Date
    Aug 2015
    Posts
    60
    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.

  3. #3
    Join Date
    Jan 2002
    Location
    Probably on a plane somewhere or in a hotel room.
    Posts
    426
    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.

  4. #4
    Join Date
    Aug 2015
    Posts
    60
    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?

  5. #5
    Join Date
    Jan 2002
    Location
    Probably on a plane somewhere or in a hotel room.
    Posts
    426
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •