Hello Don,
Indeed, the condition that my colleague Sorin specified:
Code: Select all
((&Feature = 3) AND NOT (!Feature = 3))
can be translated to the following: Feature will be installed locally and Feature is not already installed on the machine.
In what regards the elevated custom action, you can use, for example, our predefined
"LaunchFile" custom action which will have the
"Run as administrator" flag checked. If you need to execute it after the application is installed, you can simply add it after
"Add resources" action group (
"Custom Actions" page). Also, if you want your custom action to be executed only on
"Install", simply uncheck the "Uninstall" and "Maintenance" options from under
"Execution Stage Condition".
I would also like to run a custom action elevated on uninstall, *only* if they had the feature installed.
In what regards this, you can simply add your custom action before the
"Remove Resources" action group, check the
"Run as Administrator" flag, uncheck the
"Install" and
"Maintenance" options from under the
"Execution Stage Condition" and, in the
"Condition:" field, you can use a condition as it follows:
Code: Select all
((&Feature = 2) AND (!Feature = 3))
which can be translated as it follows: Feature will be uninstalled and Feature is already installed on the machine.
Hope this helps.
All the best,
Catalin