Can I use a command line option without a value?

Comments

2 comments

  • Avatar
    wojciechka

    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.

  • Avatar
    Dirk Stegemann

    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...

Please sign in to leave a comment.