I'd like to pass in a parameter (e.g. --test) to trigger some behaviour at install time. Right now I can do --test true and it works, but I'd like to avoid the true if possible.

asked 22 May '13, 09:57

danish's gravatar image

danish
1393940
accept rate: 0%


Unfortunately it is not currently possible to create a parameter as a flag - all parameters require specifying a value.

It is possible to create a booleanParameter, but it will still require to pass the value - for example installer.exe --test false or installer.exe --test 1.

You can then use <isTrue> rule to determine if the value for --test is 0 or 1.

link

answered 22 May '13, 17:03

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

I'm successfully passing a command-line option without a value, e.g.: --test

This is possible after setting the <ignoreinvalidoptions>1</ignoreinvalidoptions> project property.

On Mac OS X, I'm seeing a warning being written to the console at runtime ("Ignoring option test"), but I can live with that...

link

answered 23 May '13, 03:59

Dirk%20Stegemann's gravatar image

Dirk Stegemann
681283244
accept rate: 31%

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:

×23
×3

Asked: 22 May '13, 09:57

Seen: 915 times

Last updated: 23 May '13, 04:00