I am trying to run script:

            <runProgram>
                <program>./ChangeService.bat</program>
                <programArguments></programArguments>
            </runProgram>

and the install keeps failing on this script. The script file exists in the same directory as the xml of the installer is. and I use relative paths to all other files. Can you detect what I did wrong? Thanks

asked 12 Oct '14, 13:34

walla's gravatar image

walla
1444
accept rate: 0%


I am assuming you want to run this at build time, if you are referencing the bat file being relative to the XML file.

In that case what you should do is specify ${build_project_directory} as <workingDirectory>:

<runProgram> <program>./ChangeService.bat</program> <programArguments></programArguments> <workingDirectory>${build_project_directory}</workingDirectory> </runProgram>

This will run the file with current directory being set to same location as where the XML project is located.

However, if you mean running the script at installation time, you should specify <workingDirectory> as the directory where the .bat script is installed - such as:

<runProgram> <program>./ChangeService.bat</program> <programArguments></programArguments> <workingDirectory>${installdir}</workingDirectory> </runProgram>

link

answered 13 Oct '14, 09:48

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:

×36
×15

Asked: 12 Oct '14, 13:34

Seen: 1,044 times

Last updated: 13 Oct '14, 09:48