MSFTNEXT

Google Chrome useful command line arguments

The Google Chrome browser is one of those programs that, as it seems, cannot have anything to do with the Windows command line. But this is not the case, Chrome supports many command line arguments that can be used to launch a browser with a specific set of functions.

It is not necessary to use the command line directly for this, it is much more convenient to launch the browser from the Run window or using a modified shortcut.

You should use the following syntax to run Chrome with command line arguments.

chrome.exe --option

If it is more convenient for you to use a shortcut, you need to open its properties. Right-click the Chrome shortcut on the Desktop, select Properties, and modify the text box that contains the path to the browser executable file. In the “Object” field, add the desired argument with two hyphens separated by a space.

Here are some of the options you may find useful.

If the “Object” field includes the path to the chrome executable file in quotes, you should place the arguments  after them.

Google Chrome command line arguments

Here are the examples of the most commonly used command line arguments for the Google Chrome browser.

–disable-extensions

This argument is used to launch a browser with disabled third-party extensions. The --disable-plugins switch serves similar tasks, only it disables not extensions, but plugins, if any. The terms “plugin” and “extension” are used interchangeably today, but they are not the same. In general, plugins are software modules represented by binaries that extend the functionality of a browser, like video codecs, while extensions often just a set of scripts that modify the target web page.

–make-chrome-default

An argument to set Chrome as the default browser. The --make-default-browser switch serves similar purposes.

–headless –screenshot

Allows you to take screenshots of a specific page of a website without opening the page itself, used by web devs in scripts to monitor the interface of sites. The command requires additional arguments – the path to the saved screenshot and the address of the web page, for example, chrome.exe --headless --screenshot = "D:\capture.jpg" "https://www.msftnext.com".

By default, the generated screenshot has dimensions of 800×600 px. To set a different dimension, add the option --window-size = 1000,1200 after a space to the end of the path. 1000 in this case is the horizontal size, and one 1200 is the vertical size.

–disable-sync

Launches a browser with Google Account sync disabled, even if sync is enabled.

–incognito

Opens a browser instance in Incognito mode.

–disable-gpu

If from time to time you need to start the browser with hardware acceleration disabled, create a separate shortcut with the –disable-gpu parameter.

–mute-audio

If you start Chrome with this switch, it will disable audio and sound effects on all pages.

–app

The command line parameter to turn sites into web apps. It takes the URL of the site as an argument, like this: --app = "https://www.msftnext.com". In this mode, the browser window is hide all controls, menus and tools.  Only hotkeys and a context menu will remain available.

–no-experiments

An option to disable all active experimental settings on the chrome://flags page. It will come in handy if, after enabling any of the flags, the browser isn’t able to start normally.

And this is just a small part of the options that Google Chrome supports.

For a complete list of switches, see peter.sh/experiments/chromium-command-line-switches. Most of them will be useful only for developers and system administrators, but regular users can also find a lot of interesting things in this huge list.

Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!
Exit mobile version