Hello,

I created a package which need to be install on LINUX & WINDOWS. There are several parameters which required to be in windows but not need in LINUX. When I'm running linux installation in unattended mode with giving this parameters I get a message:

"The following options were not specified and are required:"

How can I avoid this on LINUX.

This parameters are in <choiceparametergroup> which have a rule to be picked only in windows platform , but seems that in unattended mode it not working.

Thanks in Advanced. Ronen

asked 14 Nov '12, 09:04

Ronen's gravatar image

Ronen
16565656
accept rate: 0%


The rules for a parameter are not evaluated in unattended mode.

It is possible 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>

Also, you should add an additional check in <preInstallationActionList> or <readyToInstallActionList> to handle unattended mode:

<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 14 Nov '12, 10:16

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

I probably didn't clearly describe my problem. There are two parameters which required in windows. user & password. These parameters are defined inside choiceParameterGroup which contain rule for windows only. When executing the installer on Linux in GUI & Text mode these choice parameter are not appear to the user ( In windows it appears as expected). But, when executing the installer on Linux with unattended mode these parameters are need to be provided in the command line (as mandatory parameters). My question is if the choiceParameterGroup which restricted to windows only ignored in unattended mode.

Thanks, Ronen

(12 Dec '12, 03:45) Ronen

The second part of my solution is meant to validate that parameters have proper values in unattended mode - the <throwError> action will print an error in unattended mode when it detects the value is empty. The recommended place to put the actions is beginning of <project>'s <readyToInstallActionList> actions - so it will not start installation if the value is not specified for one or more parameters.

(12 Dec '12, 09:46) wojciechka ♦♦
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:

×176
×73
×11

Asked: 14 Nov '12, 09:04

Seen: 1,174 times

Last updated: 12 Dec '12, 09:46