This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Run Custom Action IF Feature is uninstalled.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2015
03:49 AM
Run Custom Action IF Feature is uninstalled.
Hi there,
i just cant get the correct condition together to run a custom action only if a feature is uninstalled.
I have two Custom Actions. One installs a Service needed by the feature "SCREENrec", the other one deletes it.
My Condition for the installation is:
NOT !SCREENrec=3 AND &SCREENrec=3
Which means: IF the Feature IS NOT installed AND WILL BE installed.
Works fine and dandy, will also install the service correctly if the feature is added via "modify".
For uninstallation i reversed the condition:
!SCREENrec=3 AND NOT &SCREENrec=3
Which should mean: IF the feature IS installed and WILL NOT BE installed.
However, the problem is that, if i install the feature on first time install. It will correctly install the service.
Then i open the modify function and add another feature, (not touching the SCREENrec), it will trigger the uninstall action!
WHY?
Could someone please give me a condition to execute if a specific feature will be installed or will be uninstalled?
Google wasn't quite helpfull..
Thanks in advance,
Johann
i just cant get the correct condition together to run a custom action only if a feature is uninstalled.
I have two Custom Actions. One installs a Service needed by the feature "SCREENrec", the other one deletes it.
My Condition for the installation is:
NOT !SCREENrec=3 AND &SCREENrec=3
Which means: IF the Feature IS NOT installed AND WILL BE installed.
Works fine and dandy, will also install the service correctly if the feature is added via "modify".
For uninstallation i reversed the condition:
!SCREENrec=3 AND NOT &SCREENrec=3
Which should mean: IF the feature IS installed and WILL NOT BE installed.
However, the problem is that, if i install the feature on first time install. It will correctly install the service.
Then i open the modify function and add another feature, (not touching the SCREENrec), it will trigger the uninstall action!
WHY?
Could someone please give me a condition to execute if a specific feature will be installed or will be uninstalled?
Google wasn't quite helpfull..
Thanks in advance,
Johann
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2015
08:14 AM
The canonical source of reference information here is the help topic Conditional Statement Syntax, or its related Examples of Conditional Statement Syntax. I believe the problem with your attempted uninstallation condition is that it will only be false when a feature is present and being reinstalled. You probably want to condition on an installed feature being removed (action set to absent: 2).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 05, 2015
08:24 AM
Thanks!
The second Link had exactly the example i needed!
(&FeatureName=2) AND (!FeatureName=3)
But i fully agree with the comment section below this MSDN Article. It should be documented way better.. 😉
The second Link had exactly the example i needed!
(&FeatureName=2) AND (!FeatureName=3)
But i fully agree with the comment section below this MSDN Article. It should be documented way better.. 😉