Hi Richard,
I would suggest that you use the predefined "UserRegistrationDlg" dialog for this purpose. You can add it to your project by selecting "Use Serial Validation" in the Serial Validation page. See the following page for details on how to configure the Template for the serial:
http://www.advancedinstaller.com/user-g ... -page.html
Switch to the Dialogs page and add a checkbox to the "UserRegistrationDlg" dialog. Make the following changes for this checkbox:
- Text: "Install the trial version" (or something similar)
- Property Name: "TRIAL_CK" (for instance).
- Value: "YES"
The idea would be to disable the MaskedEdit control when the checkbox is selected. In order to achieve this, define the following Control Conditions for the MaskedEdit control:
Code: Select all
Condition | Action
--------------------|-----------------
TRIAL_CK="YES" | Disable
NOT TRIAL_CK | Enable
In your serial validation DLL retrieve the value of the "TRIAL_CK" Property (using the "MsiGetProperty" function) and test its value. If the value is "YES" (that is, the checkbox is checked), set the "SERIAL_VALIDATION" Property to "TRUE" (using the "MsiSetProperty" function) and then return, without performing any validation of the serial entered by the user (stored in the PIDKEY Property).
That is, if the checkbox "Install the trial version" is checked, no serial validation is performed and the next dialog will be displayed. See the following page for a sample serial validation DLL Custom Action:
http://www.advancedinstaller.com/user-g ... n-dll.html
In the Registry page create a registry value specifying the Formatted value [PIDKEY] as its data.
Hope this helps.
Regards,
Ionut
FOLLOW US
Get the latest news in Application Packaging