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 ?
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)
Please log in to answer
Posted by:
mikej01
16 years ago
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".
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
16 years ago
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.
Posted by:
anonymous_9363
16 years ago
[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]
You said "
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.