Edge Command Line Arguments
2022-1-6 01:47:58 Author: textslashplain.com(查看原文) 阅读量:59 收藏

Microsoft Edge offers broad variety of configuration options via Group Policy (for Enterprises), the edge://settings page, the edge://flags page (mostly experimental options), and finally via command-line arguments that are passed to the msedge.exe executable. This list of sources is roughly in order of stability and supportability– earlier choices change less often (and with more notice) than options I listed later.

List of all command-line arguments for Edge?

Unfortunately, Edge has not published a list of implemented command line arguments, although in principle we could use the same tool Chromium does to parse our source and generate a listing.

As of January 2022, the list of command-line arguments generated out of the upstream source code is outdated: it was last updated at the end of 2020. The snapshot from then can be viewed here: Chromium Command line arguments. You can check the Last automated update occurred on text in that page to see whether it has been updated recently.

In general, Edge’s command-line arguments are the same as Chromium‘s, with the exception of marketing names (e.g. Chrome uses --incognito while msedge.exe uses --inprivate) and restricted words (Edge replaces blacklist with denylist and whitelist with allowlist).

Enabling or disabling features?

Many Edge features are controlled by named “features” that can be enabled or disabled using the --enable-features or --disable-features command line argument. Each argument accepts a comma-delimited list of feature names, like so:

msedge.exe --enable-features=msEdgeDeleteBrowsingDataOnExit,msEdgeOptionB --disable-features=FeatureC

Unfortunately, there’s no documented list of feature names, although the features inherited from upstream can be found in the Chromium-source code, often in one of many files named features.cc.

An argument I tried didn’t seem to do anything? Why not?

The most common reason a command line flag does not work is that nearly all command-line flags only take effect if they are passed on the command line when all Edge instances are closed.

Before trying to launch a new instance with a command line, close all Edge browser windows, then check the OS task manager (taskmgr.exe or Control+Shift+Esc in Windows) to kill any background Edge processes you see.

In particular, Edge’s “Startup Boost” feature means that there’s often a hidden msedge.exe instance hanging around in the background even when all browser windows are closed. You can disable Startup Boost if you like using the option in edge://settings:

You can verify that the current Edge instance you’re using has a desired command-line argument by visiting edge://version and looking for the Command-line value in the page:

Can I set the “Default” command-line?

Sometimes, users would like to set a “default” command line for Edge to enable or disable options every time the browser is launched. There is presently no mechanism to do this– you can edit the Edge shortcuts pinned to your desktop or taskbar, and edit launch arguments for file associations inside the Windows Registry, but such changes won’t impact Edge launches for Startup Boost or via other mechanisms.

Instead, you should look for a more supported option for setting the desired behavior (e.g. a Group Policy, or edge://settings or edge://flags entry). If there’s no such item available, you should send us feedback using the Send feedback command found in the > Help and Feedback menu. If persistence of a command line option is broadly desired, we may promote it to a persistently-configurable location (e.g. we made Edge’s Cipher-suite Deny list settable via a Group Policy).

-Eric

Impatient optimist. Dad. Author/speaker. Created Fiddler & SlickRun. PM @ MSFT '01-'12, and '18-, presently working on Microsoft Edge. My words are my own.


文章来源: https://textslashplain.com/2022/01/05/edge-command-line-arguments/
如有侵权请联系:admin#unsafe.sh