Command Line Arguments

chrlauncher natively accepts a variety of command-line flags. These flags override the static settings defined in your chrlauncher.ini file at runtime.

Mastering these arguments is highly useful for power users writing .bat scripts, setting up Windows Task Scheduler jobs, or creating customized desktop shortcuts for specific workflows.

chrlauncher Control Flags

These flags are intercepted and consumed by the launcher itself to control update and UI behavior. They must be passed with a leading dash (-) or forward slash (/).

  • -autodownload
    • Forces the launcher to automatically download and install an update if one is found, temporarily overriding a ChromiumAutoDownload=false INI setting.
  • -bringtofront
    • Forces the chrlauncher progress window to pop to the foreground when a download starts, overriding ChromiumBringToFront.
  • -forcecheck
    • Bypasses the ChromiumCheckPeriod cache timer. It forces an immediate HTTP call to the API to check for a new version, regardless of when it last checked.
  • -wait
    • Forces the launcher to block and delay launching the browser until the check, download, and extraction processes have entirely finished.
  • -update
    • Runs chrlauncher strictly in "Updater Only" mode. It will check, download, and install updates, then silently exit. The browser will not be launched.

Example: Scheduled Task Automation

If you want to create a Windows Scheduled Task that updates your portable browser silently in the background every night at 3 AM without popping up any UI, you would use:

chrlauncher.exe -update -forcecheck -autodownload

Window Management Flags

If the browser is already running when you execute chrlauncher.exe, the launcher needs to tell the existing browser process to open a new window rather than crashing or doing nothing.

chrlauncher specifically detects and safely passes the following standard window-management flags to the browser instance:

  • -new-tab
  • -new-window
  • --new-window
  • -new-instance

Browser Arguments and URL Passthrough

What happens if you pass an argument that chrlauncher doesn't recognize?

Any command-line argument passed to chrlauncher.exe that is not one of the specific control flags above will be passed directly through to the underlying browser executable.

Furthermore, chrlauncher includes smart detection for web URLs and specific file extensions. If you pass a URL string, or a local file path ending in an HTML, PDF, SVG, or WEBP extension, chrlauncher formats the execution to instruct the browser to open that specific target.

Practical Passthrough Examples

1. Opening a specific website with an update check:

chrlauncher.exe -forcecheck https://github.com/henrypp/chrlauncher
Behavior: Forces an update check. Once finished, launches the browser and immediately navigates to the GitHub repository.

2. Launching in Incognito mode:

chrlauncher.exe --incognito
Behavior: chrlauncher ignores --incognito, passing it directly to chrome.exe, launching your portable browser in private browsing mode.

3. Opening a local PDF document:

chrlauncher.exe "C:\Users\Admin\Documents\Report.pdf"
Behavior: Launches the browser and uses its internal PDF viewer to display the local document.

Common Pitfalls with Arguments

  • Quoting Paths: When passing file paths or URLs containing spaces, you must wrap the entire path in double-quotes, otherwise Windows will split the path into multiple arguments.
  • Argument Order: Ensure chrlauncher-specific flags (like -wait) are placed before any URLs you intend to pass to the browser.