Jump to content

Command line args


Recommended Posts

I was asked if I could add a command line arg to toggle "Load desktop before install". It is no big deal to add it. But why stop there? Would you want to see all (or nearly all) options be changable via a command line arg?

WPI.hta options=myoptions.js ShowExtraButtons=true InstallByCategory=false ShowCommandLineInInstaller=true

This would temporarily override your saved settings.

Whatcha think?

Link to comment
Share on other sites


Happy new Year!!! :hello:

I think this is a good idea. :-)

Some options are really necessary - some maybe not.

So we could vote for options we want to have also available on commandline.

But: Maybe there is a user which needs an option for a very specific case which is not in the list. So why not implement something like a Map (or Dictionary in JS?) which holds all config-settings (key = config-key, value = config-value) and is initialized with default-values and can be overwritten with command-line-arguments.

e.g. settings['options'] = './WPIScripts/config.js';

if [command_line_has_options_argument] settings['options'] = get_argument_from_command_line

So you have

- all settings at one place

- can easily extend it

- can easily overwrite all settings with command-line-arguments

Al

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...