I'm trying to validate the address of a machine a user enters during installation, by trying to ping the given machine. I'm looking at doing something similar to the following block; but it doesn't work so I'm wondering if it's something that's actually possible. Or something I should be validating differently.

    <description>The machines address</description>
            <programarguments>-n 1 ${gw_address}</programarguments>
            <platformtest type="windows"/>

asked 07 Dec '12, 09:25

A%20Jefferiss's gravatar image

A Jefferiss
accept rate: 100%

What error are you receiving? With the current code, the validation will never trigger because the action is set to <abortonerror>0</abortonerror>. You could use:

            <customErrorMessage>The provided address is not accessible</customErrorMessage>
            <programArguments>-n 1 ${gw_address}</programArguments>
                  <platformTest type="windows"/>

answered 08 Dec '12, 05:17

juanjo's gravatar image

juanjo ♦♦
accept rate: 23%

With my original XML I was getting an error saying that stringParameter cannot contain validationActionList at line 16 in my XML.

With the block you've provided I'm getting a error saying that ruleList can't be a child of valiadationActionList...so something higher up in my XML is causing a problem because I haven't had that issue with other validationActionLists's I've used :)

(10 Dec '12, 02:46) A Jefferiss

Moving the ruleList into runPogram like so fixed that issue:

        <customerrormessage>The provided address is not accessible</customerrormessage>
        <programarguments>-n 1 ${gw_address}</programarguments>
            <platformtest type="windows"/>

The installer built without any issues and is throwing the expected errors now :)

(10 Dec '12, 02:57) A Jefferiss

You are right, I misplaced the ruleList, It is fixed now :)

(10 Dec '12, 03:24) juanjo ♦♦
Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: 07 Dec '12, 09:25

Seen: 1,230 times

Last updated: 10 Dec '12, 03:24