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?

Thanks
0 Comments   [ + ] Show Comments

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.

Answers

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

Please log in to comment
2
Ranjha,

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.

Rgds,

PJ
Answered 06/06/2011 by: pjgeutjens
Red Belt

Please log in to comment
2
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
0
Thanks everybody for all your help, I got it working.
Answered 06/06/2011 by: ranjha100
Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity