Hello, I want to create an installer that will have prerequisite inside. The prerequisite will be installed from URL and based on checkbox condition.
So I add prerequisite in the Future-based section, add condition to install using “Registry value with specified content” I’ll use HKCU\Software\_GInstaller\Flag key. The “Exact match” for this key is 0.
I have three custom action scripts:
Script_1 (at the beginning of Wizard Dialog Stage). This script create key in registry and set value to 0.
Script_2 (at the beginning of Install Execution Stage). This script set 0 value to the key that created in Script_1.
Script_3 (at the end of the Installation). Script for clear registry key that used during installation.
If Script_1 set 0 and Script_2 set 0 – prerequisite installation will be passed.
If Script_1 set 1 and Script_2 set 0 – prerequisite installation will be successful.
Now I want to control the prerequisite installation using checkbox on the Welcome dialog. If check box checked – the prerequisite must be installed. Otherwise – passed.
So I use Script_Control, that change the registry key HKCU\Software\_GInstaller\Flag to 1 if checkbox is checked, and 0 – otherwise when Next button will be pushed on the Welcome dialog.
But this not works for me.
The algorithm is:
Scrip_1 – Set 0 to registry flag;
User check the checkbox (the prerequisite should be installed)
Script_Control – Set 1 to registry flag;
Installation passed.
Another way:
Scrip_1 – Set 1 to registry flag;
User uncheck the checkbox (the prerequisite should not be installed)
Script_Control – Set 0 to registry flag;
Installation success.
What is the right way to control prerequisite installation?
I moved the prerequisite to the Post-install sections, but this not helped.
Thanks
P.S. The demo project attached
FOLLOW US
Get the latest news in Application Packaging