/build/static/layout/Breadcrumb_cap_w.png

Conditional registry deletion

I am new to Wise Package Studio, so please excuse me if this ? has been answered before.
I am using Wise Package Studio 6. Windows Installer Editor.
I have configured the removal of certain registry keys but I need to remove these keys only if a certain file exists.
I have set the search to look for the required file.
I am using an IF statement to perform other functions but how do I get the RemoveRegistry table entries to only be removed if the the IF statement is True?

0 Comments   [ + ] Show comments

Answers (2)

Posted by: ZhuBaJie 18 years ago
Orange Belt
0
Enter the Custom Action!

You can easily add a custom action with a VBScript which checks if the file exists and, if yes, takes the appropriate action.

Start de Windows Installer Editor, go to MSI Script, Execute Deferred tab.
After ScheduleReboot add a condition IF NOT REMOVE~="ALL" and betweet it and the End statement add the Custom Action "Call VBScript from Embedded Code".
Do your scripting thing...
On the Properties page of this Custom Action set "In-Script Options" to "Deferred Execution - System Context" and set "Processing" to "Synchronous, Ignore exit code".

There you go!
Posted by: xythex 18 years ago
Orange Senior Belt
0
WildHair wrote a really nice article on Advanced custom action conditions. It has a really nice overview on conditions in general. It seems like you would be able to set a condition on the component containing your regremove based on the system search although I have never done this specifically before.

His post can be found Here
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