Hello,

I have choice parameter group which define some option to the user. some of the parameters are user & password data. I limited this choiceParameterGroup to be windows platform only (not need it on linux) In GUI & Text mode it working as required and not demanding for these parameters. But, In unattended mode it demanding these parameters. I have the following two questions:

  1. How can I prevent the demand of these parameters on linux in unattended mode ?
  2. How can I prevent the demand of these parameters base on some variable content ?

Error Message & code are below

There has been an error. The following options were not specified and are required: --service_config_password --service_config_user

    <choiceParameterGroup>
        <name>service_config_user</name>
        <title>Service Configuration</title>
        <description>Logon Service Configuration</description>
        <explanation></explanation>
        <value></value>
        <default></default>
        <parameterList>
            <labelParameter>
                <name>local</name>
                <description>Local Account</description>
                <explanation></explanation>
                <image></image>
            </labelParameter>
            <parameterGroup>
                <name>this_account</name>
                <title>This Account</title>
                <explanation></explanation>
                <value></value>
                <default></default>
                <parameterList>
                    <stringParameter>
                        <name>service_config_account</name>
                        <description>This Account</description>
                        <explanation></explanation>
                        <value>${env(USERDOMAIN)}\${system_username}</value>
                        <default></default>
                        <allowEmptyValue>1</allowEmptyValue>
                        <width>30</width>
                    </stringParameter>
                    <passwordParameter>
                        <name>service_config_password</name>
                        <description>Password</description>
                        <explanation></explanation>
                        <value></value>
                        <default></default>
                        <allowEmptyValue>1</allowEmptyValue>
                        <descriptionRetype>Confirm Password</descriptionRetype>
                        <width>20</width>
                    </passwordParameter>
                </parameterList>
                <validationActionList>
                    <throwError>
                        <text>The provided credentials are not valid</text>
                        <ruleList>
                            <userTest>
                                <logic>valid_password</logic>
                                <negate>1</negate>
                                <password>${service_config_password}</password>
                                <username>${service_config_account}</username>
                            </userTest>
                        </ruleList>
                    </throwError>
                </validationActionList>
            </parameterGroup>
        </parameterList>
        <postShowPageActionList>
            <setInstallerVariable>
                <name>service_config_account</name>
                <value></value>
                <ruleList>
                    <compareText>
                        <logic>equals</logic>
                        <text>${service_config_user}</text>
                        <value>local</value>
                    </compareText>
                </ruleList>
            </setInstallerVariable>
            <setInstallerVariable>
                <name>service_config_password</name>
                <value></value>
                <ruleList>
                    <compareText>
                        <logic>equals</logic>
                        <text>${service_config_user}</text>
                        <value>local</value>
                    </compareText>
                </ruleList>
            </setInstallerVariable>
        </postShowPageActionList>
        <ruleList>
            <platformTest>
                <type>windows</type>
            </platformTest>
            <compareValues>
                <logic>equals</logic>
                <value1>${segment_config}</value1>
                <value2>1</value2>
            </compareValues>
        </ruleList>
    </choiceParameterGroup>

asked 01 Jan '13, 08:25

Ronen's gravatar image

Ronen
16565656
accept rate: 0%


Currently the checking for required values does not take rules into account.

This is similar to the http://answers.bitrock.com/questions/2033/avoid-parameters-request-in-linux-and-demand-on-windwos question.

Currently the solution is the same as in the other question - to validate the value in <validationActionList> for the field or group:

<validationActionList> <throwError> <text>You need to specify a value</text> <ruleList> <compareTextLength> <length>0</length> <logic>equals</logic> <text>${parameter_name}</text> </compareTextLength> </ruleList> </throwError> </validationActionList>

And perform an additional check in <preInstallationActionList> or <readyToInstallActionList> to handle unattended mode and error out if value is not specified or incorrect:

<throwError> <text>No value specified for --parameter_name</text> <ruleList> <compareTextLength> <length>0</length> <logic>equals</logic> <text>${parameter_name}</text> </compareTextLength> <platformTest> <type>windows</type> </platformTest> </ruleList> </throwError>

link

answered 02 Jan '13, 10:25

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

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:

×6
×4

Asked: 01 Jan '13, 08:25

Seen: 1,988 times

Last updated: 02 Jan '13, 10:25