The tool I am using is Wise Package Studio to build my MSI. My question is, how can I run a vbscript only if the user selects a certain feature and installs it and not run the vbscript if the users does not install that feature. For example if feature "Examples" is installed, then run the VBscript, otherwise don't run the script.

I have already written the vbscript that edits a text file already on the destination computer. Also, I want this script to only run during the initial install and not during uninstall. What would my if statement condition be for this Vbscript to run? Also, do I put this condition along with the vbscript in the Execute Immediate or Execute Deferred?

0 Comments   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


Set "&Examples=3" condition for your sequnce. Custom action can be sequnced after "Cost Finalize" action.
Answered 06/06/2011 by: itolutions
Purple Belt

Please log in to comment

You can condition your action on the feature actions for the installation.
Have a look at this MSDN site, what you're looking for is the &FeatureName= style of condition mentioned near the bottom.


Answered 06/06/2011 by: pjgeutjens
Red Belt

Please log in to comment
To additionally condition so that the CA only runs during installation and not uninstallation, you can use 'Installed'. You should also consider whether or not it should run during maintenance or upgrade scenarios. See this MSDN article for more properties

Also, any action which alters the system - as your does - should go in ExecuteDeferred.
Answered 06/06/2011 by: VBScab
Red Belt

Please log in to comment
Thanks everybody for all your help, I got it working.
Answered 06/06/2011 by: ranjha100
Yellow Belt

Please log in to comment