/build/static/layout/Breadcrumb_cap_w.png

VB script Custom action wont uninstall

Hi

Im trying to create a package for an older application that requires some registry permissions to be modified before it will run without the user having admin access to the PC.

I created the package using InstallShield 2008 and included a custom action to run a VB script that executes subinacl.exe and grants the required permissions. The msi copies the subinacl.exe file to the program files directory on the PC first.

This works fine and the application installs and runs well. However it wont Uninstall because the file gets removed before the script runs, which causes the script to error and stop the uninstall process. Can anyone tell me how to prevent the script from running on Uninstall ?

0 Comments   [ + ] Show comments

Answers (3)

Posted by: mikej01 13 years ago
Yellow Belt
0
Solved it myself using information found here
http://www.installshield.com/news/newsletter/0212-articles/msiconditions.asp

I used the direct editor on table InstallExecuteSequence to add a Condition to my Action. The Condition is "Not Installed" (without quotation marks).

Note that it is case sensitive. This will allow the Custom Action to run on install but not on Uninstall. The execution scheduling was also set for "Always Execute".
Posted by: Liesje 13 years ago
Yellow Belt
0

A commonly used condition is ‘Installed’. If this condition returns the value True, then the action is executed.
This condition means that a check is made first to see if the installation has already been performed.

The opposite is ‘NOT Installed’
Adding this condition will executed the Custom Action only if the MSI has not yet been installed.

So, if the action has to execute during an install, NOT Installed should be used.
Installed can be used for a uninstall or repair action.

Another widely used condition employs the REMOVE property. The value of the REMOVE property is a list of features delimited by commas that are to be removed. These features must be present in the Feature column of the Feature table.
If you use REMOVE~=”ALL” on the command line, the installer removes all features having an install level greater than 0.
In this case, the installer does not remove features having an install level of 0
(~ means that the value is not case-sensitive).

When the condition NOT REMOVE~=”ALL” returns the value TRUE, the Custom Action is performed during an installation or a repair action In case of an uninstall we therefore use REMOVE~=”ALL”.[/align]
Posted by: anonymous_9363 13 years ago
Red Belt
0
[nitpick]Be careful with your copying-and-pasting. :)
You said "If you use REMOVE~=”ALL” on the command line...": I'm sure we all know you meant "If you use REMOVE=”ALL” on the command line..." and that 'REMOVE~=”ALL”' is used as a condtion, but someone new to packaging may not know.[/nitpick]
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ