Is this behaviour correct?

 <initializationActionList>
    <setInstallerVariable name="foo" value="multiline
variable
value" persist="1"/>
    </initializationActionList>

    <preUninstallationActionList>
    <showInfo text="${foo}"/>

    <setInstallerVariableFromRegEx>
        <name>foo</name>
        <pattern>variable
value</pattern>
        <substitution>expr</substitution>
        <text>${foo}</text>
    </setInstallerVariableFromRegEx>

        <showInfo text="${foo}"/>
    </preUninstallationActionList>

Getting 2 time?

multiline
variable
value

asked 18 Feb '16, 16:51

kirill's gravatar image

kirill
6335
accept rate: 0%

edited 18 Feb '16, 16:58


The issue is the way the initial value of the variable is being set. Using a multiline value in a XML attribute will treat it as a single line. Instead, you should use a XML tag for <value>:

        <setInstallerVariable>
            <name>foo</name>
            <value>multiline
variable
value</value>
            <persist>1</persist>
        </setInstallerVariable>
link

answered 19 Feb '16, 04:02

alejandror's gravatar image

alejandror ♦♦
1.3k127
accept rate: 31%

edited 19 Feb '16, 04:03

hmmm.. the behaviour doesn't change..

(19 Feb '16, 04:13) kirill

Please note that the changed action is placed at <initializationActionList>, which is executed at installation time and the rest is executed at uninstallation, so it would be needed to:

  • Uninstall the previous installation.
  • Rebuild the installer with this change in the project.
  • Install it and execute the uninstaller.

If this process does not work, could you check if placing this test in a single actionList so all the actions are executed one after the other works?

(19 Feb '16, 05:30) alejandror ♦♦

it doesn't work.. if use setInstallerVariable not setInstallerVariableFromRegExp- correct work or place it not in UninstallationActionList than correct work.. but such case doesn't work

(19 Feb '16, 06:24) kirill
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:

×83
×41
×13

Asked: 18 Feb '16, 16:51

Seen: 417 times

Last updated: 19 Feb '16, 06:24