How to change the request licence dialog from trial
When using the User specific customized license option for license format (e.g. License ID & Computer Specific), user will be able to request the license via email from the Registration page using the “Request License” link. The default email client will be openned. However, there are cases when no email client is definend. In this case, the user should be allowed to copy the Request Code from the Registration dialog.
When adding the Licensing support, a "TrialwareSettingsComponent" section will be created in your project. If you open the .AIP(projct file) in a text editor (e.g. notepad) you will notice the following section, usually at the end of the project:
<COMPONENT cid="caphyon.advinst.msicomp.TrialwareSettingsComponent">
To customize the Registration dialog, this section of the project will have to be modified in a text editor.
Please create a backup of your project before making any changes to the project.
If the License ID & Computer Specific options are used for licence format, the TrialwareSettingsComponent section will have the following content:
<COMPONENT cid="caphyon.advinst.msicomp.TrialwareSettingsComponent"> <ROW Trialware="Trial" Section="Full" Key="LicenseValidationTemplate" Value="License ID: %ID% Signature: %SIGN%"/> <ROW Trialware="Trial" Section="Full" Key="PubKey" Value="2EAAAAAaAABLqeLNA2AAAJAAIADQMT84r$0fsf6F3EM1H51gzso2jAMzZT9TQ2ayynCEGzPy7IpniTrAMezAl7VVwnX"/> <ROW Trialware="Trial" Section="Full" Key="RegPathStoreLoc" Value="Software\[|Manufacturer]\[|ProductName]"/> <ROW Trialware="Trial" Section="Full" Key="RegRootStoreLoc" Value="2147483649"/> <ROW Trialware="Trial" Section="Full" Key="RegValuesStoreLoc" Value="Registration Key"/> <ROW Trialware="Trial" Section="Properties" Key="BuyUrl" Value="[|ARPURLINFOABOUT]"/> <ROW Trialware="Trial" Section="Properties" Key="LicReqContact" Value="[|ARPCONTACT]"/> <ROW Trialware="Trial" Section="Properties" Key="TrialName" Value="[|ProductName]"/> <ROW Trialware="Trial" Section="Properties" Key="UseCompId" Value="true"/> <ROW Trialware="Trial" Section="Trial" Key="AppearFirstTimeDisabled" Value="true"/> <ROW Trialware="Trial" Section="Trial" Key="DlgAppearFrequencyPercent" Value="30"/> <ROW Trialware="Trial" Section="Trial" Key="ExtensionQuantity" Value="15"/> <ROW Trialware="Trial" Section="Trial" Key="Period" Value="true"/> <ROW Trialware="Trial" Section="Trial" Key="Quantity" Value="30"/> <ROW Trialware="Trial" Section="Trial" Key="TrialId" Value="{CE980CB3-514A-484B-B246-904C62D9FF04}"/> </COMPONENT>
By default, the Registration dialog looks something like that:
In this article, two customization methods will be described:
1. Copy Request Code to Clipboard
When the user will click on the hiperlink, the request code will be copied to the clipboard. The user can manually copy the request code at any time from above line. The Registration dialog looks something like that:
To get the above Registration dialog, you need to add the following lines to the TrialwareSettingsComponent section from the .AIP(projct file).
<ROW Trialware="Trial" Section="CopyCompIdPage" Key="Cmd" Value="Computer ID code: %CompId%"/> <ROW Trialware="Trial" Section="CopyCompIdPage" Key="DlgOpt" Value="caption:DlgCaption flags:0"/> <ROW Trialware="Trial" Section="CopyCompIdPage" Key="Page" Value="copy"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="AeroCtrls" Value="Msg0 Msg0Xp LinkCopy Msg Edit EditCompId Msg2 Finish Cancel"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Ctrls" Value="Msg0 Msg0Xp Logo Header HeaderLine Msg Edit EditXp Msg2Xp Finish Cancel LinkCopy "/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Edit" Value="type:129 id:100 caption:EditCaption flags:1350631748 x:20 y:55 w:250 h:50"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="EditCompId" Value="type:129 id:100 caption:EditCaptionCompId flags:1342244992 x:70 y:0 w:100 h:15"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Link" Value="type:130 id:500 caption:LinkCaption flags:1342177280 x:20 y:20 w:250 h:10 popup:ContactReqLicenseCompId"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="LinkCopy" Value="type:130 id:1501 caption:CopyCompIdText flags:1342177280 x:20 y:20 w:350 h:20 popup:CopyCompIdPage"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="LinkCopyXp" Value="type:130 id:1501 caption:CopyCompIdText flags:1342177280 x:30 y:50 w:250 h:10 popup:CopyCompIdPage"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="LinkXp" Value="type:130 id:500 caption:LinkCaption flags:1342177280 x:30 y:70 w:250 h:10 popup:ContactReqLicenseCompId"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Msg" Value="type:130 id:3 caption:MsgCaption flags:1342177280 x:20 y:40 w:250 h:15"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Msg0" Value="type:130 id:3 caption:Msg0Caption flags:1342177280 x:20 y:0 w:55 h:15"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="MsgXp" Value="type:130 id:3 caption:MsgCaption flags:1342177280 x:30 y:70 w:250 h:15"/> <ROW Trialware="Trial" Section="Strings" Key="CopyCompIdPage#DlgCaption" Value="Clipboard" ValueLocId="TrialwareSettings.alltrials#Strings#CopyCompIdPage#DlgCaption"/> <ROW Trialware="Trial" Section="Strings" Key="CopyCompIdPage#MsgCaption" Value="Comp Id: %CompId% has been copied to the clipboard" ValueLocId="TrialwareSettings.alltrials#Strings#CopyCompIdPage#MsgCaption"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#CopyCompIdText" Value="Copy request code to clipboard" ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#CopyCompIdText"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#EditCaptionCompId" Value="%CompId%" ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#EditCaptionCompId"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#Msg0Caption" Value="Request code:" ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#Msg0Caption"/>
This customization of the Registration dialog is useful for users that do not have a default email client configured.
2. Request license via email
This customization is useful for users that have an email client configured. For those that do not have, they can manually copy the request code at any time. The Registration dialog is something like that:
To obtain the above dialog, the following section needs to be added to the default TrialwareSettingsComponent section from the .AIP(project file):
<ROW Trialware="Trial" Section="RegisterCompIdPage" Key="AeroCtrls" Value="Msg0 Msg0Xp Link LinkXp Msg Edit EditCompId Msg2 Finish Cancel"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Ctrls" Value="Msg0 Msg0Xp Logo Header HeaderLine Msg MsgXp EditXp Msg2Xp Finish Cancel LinkCopyXp"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Edit" Value="type:129 id:100 caption:EditCaption flags:1350631748 x:20 y:55 w:250 h:50"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="EditCompId" Value="type:129 id:100 caption:EditCaptionCompId flags:1342244992 x:70 y:0 w:100 h:15"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Link" Value="type:130 id:500 caption:LinkCaption flags:1342177280 x:20 y:20 w:250 h:10 popup:ContactReqLicenseCompId"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="LinkCopy" Value="type:130 id:1501 caption:CopyCompIdText flags:1342177280 x:20 y:0 w:350 h:20 popup:CopyCompIdPage"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="LinkCopyXp" Value="type:130 id:1501 caption:CopyCompIdText flags:1342177280 x:30 y:30 w:250 h:10 popup:CopyCompIdPage"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="LinkXp" Value="type:130 id:500 caption:LinkCaption flags:1342177280 x:30 y:70 w:250 h:10 popup:ContactReqLicenseCompId"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Msg" Value="type:130 id:3 caption:MsgCaption flags:1342177280 x:20 y:40 w:250 h:15"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Msg0" Value="type:130 id:3 caption:Msg0Caption flags:1342177280 x:20 y:0 w:60 h:15"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="MsgXp" Value="type:130 id:3 caption:MsgCaption flags:1342177280 x:30 y:70 w:250 h:15"/> <ROW Trialware="Trial" Section="Strings" Key="CopyCompIdPage#DlgCaption" Value="Clipboard" ValueLocId="TrialwareSettings.alltrials#Strings#CopyCompIdPage#DlgCaption"/> <ROW Trialware="Trial" Section="Strings" Key="CopyCompIdPage#MsgCaption" Value="Comp Id: %CompId% has been copied to the clipboard" ValueLocId="TrialwareSettings.alltrials#Strings#CopyCompIdPage#MsgCaption"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#CopyCompIdText" Value="Copy" ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#CopyCompIdText"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#EditCaptionCompId" Value="%CompId%" ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#EditCaptionCompId"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#Msg0Caption" Value="Request code:" ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#Msg0Caption"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Msg2" Value="type:130 id:322 caption:Msg2Caption flags:1342177280 x:20 y:120 w:250 h:15"/> <ROW Trialware="Trial" Section="RegisterCompIdPage" Key="Msg2Xp" Value="type:130 id:322 caption:Msg2Caption flags:1342177280 x:30 y:160 w:284 h:15"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#LinkCaption" Value="Request license via email" ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#LinkCaption"/> <ROW Trialware="Trial" Section="Strings" Key="RegisterCompIdPage#Msg2Caption" Value="Press the "Continue" button to validate the key and continue." ValueLocId="TrialwareSettings.alltrials#Strings#RegisterCompIdPage#Msg2Caption"/>
Instead of the default settings of the Trialware fragment being used, the custom settings from the project will be used to customize the Registration dialog.
After this step, build the project in Advanced Installer and run the setup package. When prompted with the trial dialogs, please select the Register option to test the new UI of the Registration dialog.