How to create serial key pages

asked 14 Sep '11, 07:53

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


Please, check this tutorial, which explains several ways to create serial key pages in InstallBuilder.

link

answered 14 Sep '11, 07:55

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Hey is this still valid? I need to be able to put this inside my installer for Weather4U So that no one can even install my application without putting in a valid license key so that I can prevent piracy.

(08 Sep '13, 15:03) KeyedInSoftware

The code is still valid but you decide which validation mechanism you will be implementing. In the article we mention checking for a hardcoded list of keys (not recommended) and using an external tool to validate the key. In addition, you could require Internet connection and validate the key contacting your server. You can find some more examples in the below link:

http://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_add_a_license_key_page
(16 Sep '13, 08:09) juanjo ♦♦

I cannot get it to work, this is the error.

Executing <initializationActionList>
Executing <initializationActionList>
Executing <initializationActionList>
Executing <initializationActionList>
Executing <preInstallationActionList>
Executing <preInstallationActionList>
Executing <preInstallationActionList>
Executing <preInstallationActionList>
Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${checkForUpdates}" -> "0"
<value> : "1" -> "1"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${checkForUpdates}" -> "0"
<value> : "1" -> "1"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
No rules provided, returning 'true'
Executing <preShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${installer_ui}" -> "gui"
<value> : "gui" -> "gui"

Evaluating rule <compareText>
Result is '1'
No more rules to execute
Rules are true
Executing <preShowPageActionList>
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Considering <setInstallerVariable> action
Properties of element <setInstallerVariable>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<name> : "${normalizedkey}" -> "***unknown variable normalizedkey***"
<persist> : "0" -> "0"
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<value> : "${field1}${field2}${field3}${field4}${field5}${field6}" -> "000000000000000000000000000000"

No rules provided, returning 'true'
Rules match
Action <setInstallerVariable> was properly executed
Considering <unpackFile> action
Properties of element <unpackFile>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<component> : "tools" -> "tools"
<customErrorMessage> : "" -> ""
<destination> : "${system_temp_directory}" -> "C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp"
<explanation> : "" -> ""
<folder> : "license" -> "license"
<origin> : "ValidatorInstallBuilder.exe" -> "ValidatorInstallBuilder.exe"
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"

No rules provided, returning 'true'
Rules match
Action <unpackFile> was properly executed
Considering <runProgram> action
Properties of element <runProgram>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<program> : "${system_temp_directory}/ValidatorInstallBuilder.exe" -> "C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp/ValidatorInstallBuilder.exe"
<programArguments> : "${normalizedkey}" -> "***unknown variable normalizedkey***"
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<runAs> : "" -> ""
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<stdin> : "" -> ""
<useMSDOSPath> : "1" -> "1"
<workingDirectory> : "" -> ""

No rules provided, returning 'true'
Rules match
Executing C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp/ValidatorInstallBuilder.exe ***unknown variable normalizedkey***

Program ended with an error exit code
Exit code: 1
Script exit code: 1

Script output:

Script stderr:
 Program ended with an error exit code

Error running C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp/ValidatorInstallBuilder.exe ***unknown variable normalizedkey***: Program ended with an error exit code
Error executing action <runProgram>
Executing <actionList>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "Key has been Revoked, Contact KeyedInSoftware Support for more info" -> "Key has been Revoked, Contact KeyedInSoftware Support for more info"

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "3" -> "3"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "PreValidateFailure, Please Contact KeyedInSoftware Support for more info" -> "PreValidateFailure, Please Contact KeyedInSoftware Support for more info"

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "2" -> "2"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "Key Has Exceeded Violation(Activation) Limit, Please Contact KeyedInSoftware Support To Increase your Violation Or Activation Limits." -> "Key Has Exceeded Violation(Activation) Limit, Please Contact KeyedInSoftware Support To Increase your Violation Or Activation Limits."

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "4" -> "4"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "Wrong license key, please enter a valid one" -> "Wrong license key, please enter a valid one"

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "1" -> "1"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Executing <postShowPageActionList>
Executing <installationAbortedActionList>
Executing <installationAbortedActionList>
Executing <installationAbortedActionList>
Executing <installationAbortedActionList>
Deleting registry keys

Could you please give me another code sample please here is my complete xml

<project>
<shortName>SetupWeather4U2MAC</shortName>
<fullName>Weather4U</fullName>
<version>1.0</version>
<licenseFile>Z:\BitRock InstallBuilder Projects\eula.txt</licenseFile>
<leftImage>Z:\My Visual Studio Projects\Weather4U Installer SourceCode Sharpsetup\Weather4UInstaller\Gui\Resources\logo_wybuild_w164_h314.png</leftImage>
<logoImage>Z:\My Visual Studio Projects\Weather4U Installer SourceCode Sharpsetup\Weather4UInstaller\Gui\Resources\logo_wybuild_w164_h314.png</logoImage>
<splashImage>Z:\My Visual Studio Projects\Weather4U Installer SourceCode Sharpsetup\Weather4UInstaller\Gui\Resources\logo_wybuild_w164_h314.png</splashImage>
<componentList>
    <component>
        <name>default</name>
        <description>Default Component</description>
        <canBeEdited>0</canBeEdited>
        <selected>1</selected>
        <show>1</show>
        <folderList>
            <folder>
                <description>Program Files</description>
                <destination>${installdir}</destination>
                <name>programfiles</name>
                <platforms>all</platforms>
                <shortcutList>
                    <shortcut>
                        <comment>Uninstall</comment>
                        <exec>${installdir}/${uninstallerName}</exec>
                        <icon></icon>
                        <name>Uninstall ${product_fullname}</name>
                        <path>${installdir}</path>
                        <platforms>all</platforms>
                        <runAsAdmin>0</runAsAdmin>
                        <runInTerminal>0</runInTerminal>
                        <windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
                        <windowsExecArgs></windowsExecArgs>
                        <windowsIcon></windowsIcon>
                        <windowsPath>${installdir}</windowsPath>
                    </shortcut>
                </shortcutList>
            </folder>
            <folder>
                <description>Program Files</description>
                <destination>${installdir}</destination>
                <name>programfileslinux</name>
                <platforms>linux</platforms>
            </folder>
            <folder>
                <description>Program Files</description>
                <destination>${installdir}</destination>
                <name>programfileswindows</name>
                <platforms>windows</platforms>
            </folder>
            <folder>
                <description>Program Files</description>
                <destination>${installdir}</destination>
                <name>programfilesosx</name>
                <platforms>osx</platforms>
            </folder>
        </folderList>
        <startMenuShortcutList>
            <startMenuShortcut>
                <comment>Uninstall ${product_fullname}</comment>
                <name>Uninstall ${product_fullname}</name>
                <runAsAdmin>0</runAsAdmin>
                <runInTerminal>0</runInTerminal>
                <windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
                <windowsExecArgs></windowsExecArgs>
                <windowsIcon></windowsIcon>
                <windowsPath>${installdir}/</windowsPath>
            </startMenuShortcut>
        </startMenuShortcutList>
    </component>
    <component>
        <name>tools</name>
        <description>Licensing</description>
        <canBeEdited>1</canBeEdited>
        <selected>1</selected>
        <shouldPackRuleEvaluationLogic>or</shouldPackRuleEvaluationLogic>
        <show>1</show>
        <folderList>
            <folder>
                <description>license</description>
                <destination>${installdir}</destination>
                <name>license</name>
                <platforms>all</platforms>
                <distributionFileList>
                    <distributionFile origin="C:\Users\admin1.KEYEDINSOFT.000\Documents\ValidatorInstallBuilder.exe">
                        <filterEvaluationLogic>or</filterEvaluationLogic>
                    </distributionFile>
                </distributionFileList>
            </folder>
        </folderList>
    </component>
    <component>
        <name>MonoDOTNET</name>
        <description>Mono Framework</description>
        <canBeEdited>0</canBeEdited>
        <downloadable>1</downloadable>
        <selected>1</selected>
        <show>1</show> <url>http://download.mono-project.com/archive/3.10.0/macos-10-x86/MonoFramework-MRE-3.10.0.macos10.xamarin.x86.pkg</url>
    </component>
</componentList>
<compressionAlgorithm>lzma-ultra</compressionAlgorithm>
<enableRollback>1</enableRollback>
<enableTimestamp>1</enableTimestamp>
<requireInstallationByRootUser>1</requireInstallationByRootUser>
<vendor>KeyedInSoftware</vendor>
<parameterList>
    <!-- License key page -->
    <parameterGroup>
        <name>licensekey</name>
        <title>License Key</title>
        <explanation>Please enter your registration key</explanation>
        <value></value>
        <default></default>
        <orientation>horizontal</orientation>
        <parameterList>
            <!-- A stringParameter for each field. We include a "-" as description to simulate the license-type format -->
            <stringParameter name="field1" description="" allowEmptyValue="0" width="5">
                <explanation></explanation>
                <value></value>
                <default></default>
            </stringParameter>
            <stringParameter name="field2" description="-" allowEmptyValue="0" width="5">
                <explanation></explanation>
                <value></value>
                <default></default>
            </stringParameter>
            <stringParameter name="field3" description="-" allowEmptyValue="0" width="5">
                <explanation></explanation>
                <value></value>
                <default></default>
            </stringParameter>
            <stringParameter name="field4" description="-" allowEmptyValue="0" width="5">
                <explanation></explanation>
                <value></value>
                <default></default>
            </stringParameter>
            <stringParameter name="field5" description="-" allowEmptyValue="0" width="5">
                <explanation></explanation>
                <value></value>
                <default></default>
            </stringParameter>
            <stringParameter name="field6" description="-" allowEmptyValue="0" width="5">
                <explanation></explanation>
                <value></value>
                <default></default>
            </stringParameter>
        </parameterList>
        <ruleList>
            <compareText logic="equals" text="${installer_ui}" value="gui"/>
        </ruleList>
        <validationActionList>
            <!-- Join all the fields to create the license number -->
            <setInstallerVariable name="${normalizedkey}" value="${field1}${field2}${field3}${field4}${field5}${field6}"/>
            <!-- Unpack a bundled validator program and check if the license is correct -->
            <unpackFile>
                <component>tools</component>
                <destination>${system_temp_directory}</destination>
                <folder>license</folder>
                <origin>ValidatorInstallBuilder.exe</origin>
            </unpackFile>
            <runProgram>
                <program>${system_temp_directory}/ValidatorInstallBuilder.exe</program>
                <programArguments>${normalizedkey}</programArguments>
            </runProgram>
            <throwError text="Key has been Revoked, Contact KeyedInSoftware Support for more info">
                <ruleList>
                    <compareText logic="equals" text="${program_stdout}" value="3"/>
                </ruleList>
            </throwError>
            <throwError text="PreValidateFailure, Please Contact KeyedInSoftware Support for more info">
                <ruleList>
                    <compareText logic="equals" text="${program_stdout}" value="2"/>
                </ruleList>
            </throwError>
            <throwError text="Key Has Exceeded Violation(Activation) Limit, Please Contact KeyedInSoftware Support To Increase your Violation Or Activation Limits.">
                <ruleList>
                    <compareText logic="equals" text="${program_stdout}" value="4"/>
                </ruleList>
            </throwError>
            <throwError text="Wrong license key, please enter a valid one">
                <ruleList>
                    <compareText logic="equals" text="${program_stdout}" value="1"/>
                </ruleList>
            </throwError>
        </validationActionList>
    </parameterGroup>
    <directoryParameter>
        <name>installdir</name>
        <description>Installer.Parameter.installdir.description</description>
        <explanation>Installer.Parameter.installdir.explanation</explanation>
        <value></value>
        <default>${platform_install_prefix}/${product_shortname}-${product_version}</default>
        <allowEmptyValue>0</allowEmptyValue>
        <ask>yes</ask>
        <cliOptionName>prefix</cliOptionName>
        <mustBeWritable>yes</mustBeWritable>
        <mustExist>0</mustExist>
        <width>40</width>
    </directoryParameter>
</parameterList>
</project>
(01 Nov '14, 21:34) KeyedInSoftware

It seems the tutorial has some typos. Could you replace:

<setInstallerVariable name="${normalizedkey}" value="${field1}${field2}${field3}${field4}${field5}${field6}"/>

With:

<setInstallerVariable name="normalizedkey" value="${field1}${field2}${field3}${field4}${field5}${field6}"/>
link

answered 03 Nov '14, 09:44

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

I did that but now it fails with this:

    Executing <initializationActionList>
Executing <initializationActionList>
Executing <initializationActionList>
Executing <initializationActionList>
Executing <preInstallationActionList>
Executing <preInstallationActionList>
Executing <preInstallationActionList>
Executing <preInstallationActionList>
Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${checkForUpdates}" -> "0"
<value> : "1" -> "1"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${checkForUpdates}" -> "0"
<value> : "1" -> "1"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
No rules provided, returning 'true'
Executing <preShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${installer_ui}" -> "gui"
<value> : "gui" -> "gui"

Evaluating rule <compareText>
Result is '1'
No more rules to execute
Rules are true
Executing <preShowPageActionList>
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
No rules provided, returning 'true'
Executing <preShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Executing <postShowPageActionList>
Executing <validationActionList>
Considering <setInstallerVariable> action
Properties of element <setInstallerVariable>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<name> : "normalizedkey" -> "normalizedkey"
<persist> : "0" -> "0"
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<value> : "${field1}${field2}${field3}${field4}${field5}${field6}" -> "V29FY3EZPRMPAWAAHDG7PZ967EJS4P"

No rules provided, returning 'true'
Rules match
Action <setInstallerVariable> was properly executed
Considering <unpackFile> action
Properties of element <unpackFile>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<component> : "tools" -> "tools"
<customErrorMessage> : "" -> ""
<destination> : "${system_temp_directory}" -> "C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp"
<explanation> : "" -> ""
<folder> : "license" -> "license"
<origin> : "ValidatorInstallBuilder.exe" -> "ValidatorInstallBuilder.exe"
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"

No rules provided, returning 'true'
Rules match
Action <unpackFile> was properly executed
Considering <runProgram> action
Properties of element <runProgram>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<program> : "${system_temp_directory}/ValidatorInstallBuilder.exe" -> "C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp/ValidatorInstallBuilder.exe"
<programArguments> : "${normalizedkey}" -> "V29FY3EZPRMPAWAAHDG7PZ967EJS4P"
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<runAs> : "" -> ""
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<stdin> : "" -> ""
<useMSDOSPath> : "1" -> "1"
<workingDirectory> : "" -> ""

No rules provided, returning 'true'
Rules match
Executing C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp/ValidatorInstallBuilder.exe V29FY3EZPRMPAWAAHDG7PZ967EJS4P

Program ended with an error exit code
Exit code: 3
Script exit code: 3

Script output:

Script stderr:
 Program ended with an error exit code

Error running C:\Users\admin1.KEYEDINSOFT.000\AppData\Local\Temp/ValidatorInstallBuilder.exe V29FY3EZPRMPAWAAHDG7PZ967EJS4P: Program ended with an error exit code
Error executing action <runProgram>
Executing <actionList>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "Key has been Revoked, Contact KeyedInSoftware Support for more info" -> "Key has been Revoked, Contact KeyedInSoftware Support for more info"

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "3" -> "3"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "PreValidateFailure, Please Contact KeyedInSoftware Support for more info" -> "PreValidateFailure, Please Contact KeyedInSoftware Support for more info"

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "2" -> "2"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "Key Has Exceeded Violation(Activation) Limit, Please Contact KeyedInSoftware Support To Increase your Violation Or Activation Limits." -> "Key Has Exceeded Violation(Activation) Limit, Please Contact KeyedInSoftware Support To Increase your Violation Or Activation Limits."

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "4" -> "4"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Considering <throwError> action
Properties of element <throwError>:
<abortOnError> : "1" -> "1"
<breakpoint> : "0" -> "0"
<customErrorMessage> : "" -> ""
<explanation> : "" -> ""
<progressText> : "" -> ""
<ruleEvaluationLogic> : "and" -> "and"
<run> : "1" -> "1"
<show> : "1" -> "1"
<showMessageOnError> : "1" -> "1"
<text> : "Wrong license key, please enter a valid one" -> "Wrong license key, please enter a valid one"

Evaluating set of rules with 'and' evaluation logic 
Properties of element <compareText>:
<logic> : "equals" -> "equals"
<negate> : "0" -> "0"
<nocase> : "0" -> "0"
<text> : "${program_stdout}" -> ""
<value> : "1" -> "1"

Evaluating rule <compareText>
Result is '0'
Rule evaluation logic is 'and', no need to evaluate other rules
Rules are false
Rules do not match skipping action <throwError>
Executing <postShowPageActionList>
Executing <installationAbortedActionList>
Executing <installationAbortedActionList>
Executing <installationAbortedActionList>
Executing <installationAbortedActionList>
Deleting registry keys

And here is my code again:

<project>
    <shortName>SetupWeather4U2MAC</shortName>
    <fullName>Weather4U</fullName>
    <version>1.0</version>
    <licenseFile>Z:/BitRock InstallBuilder Projects/eula.txt</licenseFile>
    <leftImage>Z:/My Visual Studio Projects/Weather4U Installer SourceCode Sharpsetup/Weather4UInstaller/Gui/Resources/logo_wybuild_w164_h314.png</leftImage>
    <logoImage>Z:/My Visual Studio Projects/Weather4U Installer SourceCode Sharpsetup/Weather4UInstaller/Gui/Resources/logo_wybuild_w164_h314.png</logoImage>
    <splashImage>Z:/My Visual Studio Projects/Weather4U Installer SourceCode Sharpsetup/Weather4UInstaller/Gui/Resources/logo_wybuild_w164_h314.png</splashImage>
    <componentList>
        <component>
            <name>default</name>
            <description>Default Component</description>
            <canBeEdited>0</canBeEdited>
            <selected>1</selected>
            <show>1</show>
            <folderList>
                <folder>
                    <description>Program Files</description>
                    <destination>${installdir}</destination>
                    <name>programfiles</name>
                    <platforms>all</platforms>
                    <shortcutList>
                        <shortcut>
                            <comment>Uninstall</comment>
                            <exec>${installdir}/${uninstallerName}</exec>
                            <icon></icon>
                            <name>Uninstall ${product_fullname}</name>
                            <path>${installdir}</path>
                            <platforms>all</platforms>
                            <runAsAdmin>0</runAsAdmin>
                            <runInTerminal>0</runInTerminal>
                            <windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
                            <windowsExecArgs></windowsExecArgs>
                            <windowsIcon></windowsIcon>
                            <windowsPath>${installdir}</windowsPath>
                        </shortcut>
                    </shortcutList>
                </folder>
                <folder>
                    <description>Program Files</description>
                    <destination>${installdir}</destination>
                    <name>programfileslinux</name>
                    <platforms>linux</platforms>
                </folder>
                <folder>
                    <description>Program Files</description>
                    <destination>${installdir}</destination>
                    <name>programfileswindows</name>
                    <platforms>windows</platforms>
                </folder>
                <folder>
                    <description>Program Files</description>
                    <destination>${installdir}</destination>
                    <name>programfilesosx</name>
                    <platforms>osx</platforms>
                </folder>
            </folderList>
            <startMenuShortcutList>
                <startMenuShortcut>
                    <comment>Uninstall ${product_fullname}</comment>
                    <name>Uninstall ${product_fullname}</name>
                    <runAsAdmin>0</runAsAdmin>
                    <runInTerminal>0</runInTerminal>
                    <windowsExec>${installdir}/${uninstallerName}.exe</windowsExec>
                    <windowsExecArgs></windowsExecArgs>
                    <windowsIcon></windowsIcon>
                    <windowsPath>${installdir}/</windowsPath>
                </startMenuShortcut>
            </startMenuShortcutList>
        </component>
        <component>
            <name>tools</name>
            <description>Licensing</description>
            <canBeEdited>1</canBeEdited>
            <selected>1</selected>
            <shouldPackRuleEvaluationLogic>or</shouldPackRuleEvaluationLogic>
            <show>1</show>
            <folderList>
                <folder>
                    <description>license</description>
                    <destination>${installdir}</destination>
                    <name>license</name>
                    <platforms>all</platforms>
                    <distributionFileList>
                        <distributionFile origin="C:/Users/admin1.KEYEDINSOFT.000/Documents/ValidatorInstallBuilder.exe">
                            <filterEvaluationLogic>or</filterEvaluationLogic>
                        </distributionFile>
                    </distributionFileList>
                </folder>
            </folderList>
        </component>
        <component>
            <name>MonoDOTNET</name>
            <description>Mono Framework</description>
            <canBeEdited>0</canBeEdited>
            <downloadable>1</downloadable>
            <selected>1</selected>
            <show>1</show>
            <url>http://download.mono-project.com/archive/3.10.0/macos-10-x86/MonoFramework-MRE-3.10.0.macos10.xamarin.x86.pkg</url>
        </component>
    </componentList>
    <compressionAlgorithm>lzma-ultra</compressionAlgorithm>
    <enableRollback>1</enableRollback>
    <enableTimestamp>1</enableTimestamp>
    <requireInstallationByRootUser>1</requireInstallationByRootUser>
    <vendor>KeyedInSoftware</vendor>
    <parameterList>
        <!-- License key page -->
        <parameterGroup>
            <name>licensekey</name>
            <title>License Key</title>
            <explanation>Please enter your registration key</explanation>
            <value></value>
            <default></default>
            <orientation>horizontal</orientation>
            <parameterList>
                <!-- A stringParameter for each field. We include a "-" as description to simulate the license-type format -->
                <stringParameter name="field1" description="" allowEmptyValue="0" width="5">
                    <explanation></explanation>
                    <value></value>
                    <default></default>
                </stringParameter>
                <stringParameter name="field2" description="-" allowEmptyValue="0" width="5">
                    <explanation></explanation>
                    <value></value>
                    <default></default>
                </stringParameter>
                <stringParameter name="field3" description="-" allowEmptyValue="0" width="5">
                    <explanation></explanation>
                    <value></value>
                    <default></default>
                </stringParameter>
                <stringParameter name="field4" description="-" allowEmptyValue="0" width="5">
                    <explanation></explanation>
                    <value></value>
                    <default></default>
                </stringParameter>
                <stringParameter name="field5" description="-" allowEmptyValue="0" width="5">
                    <explanation></explanation>
                    <value></value>
                    <default></default>
                </stringParameter>
                <stringParameter name="field6" description="-" allowEmptyValue="0" width="5">
                    <explanation></explanation>
                    <value></value>
                    <default></default>
                </stringParameter>
            </parameterList>
            <ruleList>
                <compareText logic="equals" text="${installer_ui}" value="gui"/>
            </ruleList>
            <validationActionList>
                <!-- Join all the fields to create the license number -->
                <setInstallerVariable name="normalizedkey" value="${field1}${field2}${field3}${field4}${field5}${field6}"/>

            &lt;!-- Unpack a bundled validator program and check if the license is correct --&gt;
            &lt;unpackFile&gt;
                &lt;component&gt;tools&lt;/component&gt;
                &lt;destination&gt;${system_temp_directory}&lt;/destination&gt;
                &lt;folder&gt;license&lt;/folder&gt;
                &lt;origin&gt;ValidatorInstallBuilder.exe&lt;/origin&gt;
            &lt;/unpackFile&gt;
            &lt;runProgram&gt;
                &lt;program&gt;${system_temp_directory}/ValidatorInstallBuilder.exe&lt;/program&gt;
                &lt;programArguments&gt;${normalizedkey}&lt;/programArguments&gt;
            &lt;/runProgram&gt;
            &lt;throwError text="Key has been Revoked, Contact KeyedInSoftware Support for more info"&gt;
                &lt;ruleList&gt;
                    &lt;compareText logic="equals" text="${program_stdout}" value="3"/&gt;
                &lt;/ruleList&gt;
            &lt;/throwError&gt;
            &lt;throwError text="PreValidateFailure, Please Contact KeyedInSoftware Support for more info"&gt;
                &lt;ruleList&gt;
                    &lt;compareText logic="equals" text="${program_stdout}" value="2"/&gt;
                &lt;/ruleList&gt;
            &lt;/throwError&gt;
            &lt;throwError text="Key Has Exceeded Violation(Activation) Limit, Please Contact KeyedInSoftware Support To Increase your Violation Or Activation Limits."&gt;
                &lt;ruleList&gt;
                    &lt;compareText logic="equals" text="${program_stdout}" value="4"/&gt;
                &lt;/ruleList&gt;
            &lt;/throwError&gt;
            &lt;throwError text="Wrong license key, please enter a valid one"&gt;
                &lt;ruleList&gt;
                    &lt;compareText logic="equals" text="${program_stdout}" value="1"/&gt;
                &lt;/ruleList&gt;
            &lt;/throwError&gt;
        &lt;/validationActionList&gt;
    &lt;/parameterGroup&gt;
    &lt;directoryParameter&gt;
        &lt;name&gt;installdir&lt;/name&gt;
        &lt;description&gt;Installer.Parameter.installdir.description&lt;/description&gt;
        &lt;explanation&gt;Installer.Parameter.installdir.explanation&lt;/explanation&gt;
        &lt;value&gt;&lt;/value&gt;
        &lt;default&gt;${platform_install_prefix}/${product_shortname}-${product_version}&lt;/default&gt;
        &lt;allowEmptyValue&gt;0&lt;/allowEmptyValue&gt;
        &lt;ask&gt;yes&lt;/ask&gt;
        &lt;cliOptionName&gt;prefix&lt;/cliOptionName&gt;
        &lt;mustBeWritable&gt;yes&lt;/mustBeWritable&gt;
        &lt;mustExist&gt;0&lt;/mustExist&gt;
        &lt;width&gt;40&lt;/width&gt;
    &lt;/directoryParameter&gt;
&lt;/parameterList&gt;

</project>

My Validator Returns A exit code of 3 to say that the key is revoked, I designed it and coded it where it returns different exit codes for different responses from the license server. And in this case it returns exit code 3 to show it is revoked, but for some reason it doesn't pick up on my rule where it doesn't just say cannot run validator, it fails with the message above. Please tell me how to fix this.

(03 Nov '14, 18:21) KeyedInSoftware
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×13
×11
×4

Asked: 14 Sep '11, 07:53

Seen: 3,512 times

Last updated: 03 Nov '14, 18:23