Skip to content

Command Line Arguments

Simon Tushev edited this page Jan 15, 2021 · 19 revisions

⚠ Currently, you can specify ONLY ONE command line parameter, which is CASE SENSITIVE. This restriction is temporary and most likely will be changed in the future.

The command line may look like:

  • AJUpdateWatcher.exe -config
  • AJUpdateWatcher.exe -forcesettask

Supported parameters

The newer version includes all the supported parameters from the previous version + its own ones.

Since v. 1.0.0.0

  • no parameters - run silent background check for updates if the app is configured. A message will be shown on first run.
  • -config - open configuration window.

Since v. 2.0.0.0

  • no parameters - run silent background check for updates if the app is configured AND there are any configured installations to check. A message will be shown on first run or if N consequent errors were encountered during background checks for updates.
  • -deletetask - delete scheduled task. Show a MessageBox is task has been deleted (i.e., there was a task installed). Exit immediately after.
  • -askdeletetask - if there is a scheduled task installed, ask user whether they want to delete it. Exit immediately after.

Since v. 2.0.1.0

  • -silentlydeletetask - delete scheduled task. Do not show any messages at all. Exit immediately after.
  • -forcesettask - silently delete scheduled task, if present. Regardless of previous step, silently install new scheduled task (with the actual path to the invoked instance of AJUpdateWatcher.exe). Exit immediately after.
  • -settask_askifnonconsistent - if there is a scheduled task installed, and its path does not point to the invoked instance of AJUpdateWatcher.exe, ask user whether they want to update the scheduled task. If there was no scheduled task installed, silently install one (with the actual path to the invoked instance of AJUpdateWatcher.exe). Exit immediately after.
  • -explicitcheck - run background check for updates, show a message with results anyway. Since 2.0.1.0, this is the default behavior of the corresponding start menu shortcut. Exit immediately after.

Since v. 2.0.2

🔔 All arguments now can be called with -- or / prefixes. This means that /explicitcheck, --explicitcheck will do the same thing. For backwards compatibility, single-dash options like -explicitcheck will continue to be supported.

🔔 All arguments now CASE INSENSITIVE. It is also possible to specify multiple arguments, although they will be executed in accordance with priorities.
Avoid specifying multiple parameters from the same logical group (like -deletetask -askdeletetask - this may lead to unexpected results).

🔔 Command line priorities are introduced. Currently they are:
(deletetask|askdeletetask|silentlydeletetask) > (forcesettask|settask_askifnonconsistent) > (config) > (explicitcheck) > [no args]
This means that if you run AJUpdateWatcher.exe /config --explicitcheck, you will get configuration window only, and not check for updates window.

  • -explicitcheck - now runs foreground check for AdoptOpenJDK updates, with GUI window.