Skip to content

Instantly share code, notes, and snippets.

@Efreak
Last active June 9, 2021 03:54
Show Gist options
  • Save Efreak/f54c12c5297d846001fd to your computer and use it in GitHub Desktop.
Save Efreak/f54c12c5297d846001fd to your computer and use it in GitHub Desktop.
Registers Google Chrome with windows (again) as a URL and filetype handler--but in incognito mode. If you choose 'Google Chrome Incognito' as a file/url handler, then your files/urls will open in incognito mode. You may wish to adjust the paths listed below if you don't have chrome installed in the standard location, or if you use dev or canary …
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\ChromeIncognitoHTML]
@="Chrome Incognito HTML Document"
"AppUserModelId"="ChromeIncognito"
[HKEY_CLASSES_ROOT\ChromeIncognitoHTML\Application]
"AppUserModelId"="ChromeIncognito"
"ApplicationIcon"="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
"ApplicationName"="Google Chrome Incognito"
"ApplicationDescription"="Access the Internet (Incognito Mode)"
"ApplicationCompany"="Google Inc."
[HKEY_CLASSES_ROOT\ChromeIncognitoHTML\DefaultIcon]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
[HKEY_CLASSES_ROOT\ChromeIncognitoHTML\shell]
[HKEY_CLASSES_ROOT\ChromeIncognitoHTML\shell\open]
[HKEY_CLASSES_ROOT\ChromeIncognitoHTML\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --incognito -- \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito]
@="Google Chrome Incognito"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\Capabilities]
"ApplicationDescription"="Google Chrome Incognito is a web browser that runs webpages and applications with lightning speed. It's fast, stable, and easy to use. Browse the web more safely with malware and phishing protection built into Google Chrome Incognito."
"ApplicationIcon"="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
"ApplicationName"="Google Chrome Incognito Incognito"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\Capabilities\FileAssociations]
".htm"="ChromeIncognitoHTML"
".html"="ChromeIncognitoHTML"
".shtml"="ChromeIncognitoHTML"
".xht"="ChromeIncognitoHTML"
".xhtml"="ChromeIncognitoHTML"
".webp"="ChromeIncognitoHTML"
".pdf"="ChromeIncognitoHTML"
".svg"="ChromeIncognitoHTML"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\Capabilities\Startmenu]
"StartMenuInternet"="Google Chrome Incognito"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\Capabilities\URLAssociations]
"ftp"="ChromeIncognitoHTML"
"http"="ChromeIncognitoHTML"
"https"="ChromeIncognitoHTML"
"irc"="ChromeIncognitoHTML"
"mailto"="ChromeIncognitoHTML"
"mms"="ChromeIncognitoHTML"
"news"="ChromeIncognitoHTML"
"nntp"="ChromeIncognitoHTML"
"sms"="ChromeIncognitoHTML"
"smsto"="ChromeIncognitoHTML"
"tel"="ChromeIncognitoHTML"
"urn"="ChromeIncognitoHTML"
"webcal"="ChromeIncognitoHTML"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\DefaultIcon]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\InstallInfo]
"ReinstallCommand"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --make-default-browser"
"HideIconsCommand"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --hide-icons"
"ShowIconsCommand"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --show-icons"
"IconsVisible"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome Incognito\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --incognito -- \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\RegisteredApplications]
"Google Chrome"="Software\\Clients\\StartMenuInternet\\Google Chrome Incognito\\Capabilities"
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"Firefox"="Software\\Clients\\StartMenuInternet\\FIREFOX.EXE_PRIVATE\\Capabilities"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE]
@="Firefox Private Browsing Mode"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\Capabilities]
"ApplicationDescription"="Firefox Private Browsing Mode"
"ApplicationIcon"="C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe,6"
"ApplicationName"="Firefox Private Browsing Mode"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\Capabilities\FileAssociations]
".htm"="FirefoxHTMLPrivate"
".html"="FirefoxHTMLPrivate"
".shtml"="FirefoxHTMLPrivate"
".xht"="FirefoxHTMLPrivate"
".xhtml"="FirefoxHTMLPrivate"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\Capabilities\StartMenu]
"StartMenuInternet"="FIREFOX.EXE"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\Capabilities\URLAssociations]
"ftp"="FirefoxURLPrivate"
"http"="FirefoxURLPrivate"
"https"="FirefoxURLPrivate"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\DefaultIcon]
@="C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\InstallInfo]
"HideIconsCommand"="\"C:\\Program Files (x86)\\Mozilla Firefox\\uninstall\\helper.exe\" /HideShortcuts"
"ShowIconsCommand"="\"C:\\Program Files (x86)\\Mozilla Firefox\\uninstall\\helper.exe\" /ShowShortcuts"
"ReinstallCommand"="\"C:\\Program Files (x86)\\Mozilla Firefox\\uninstall\\helper.exe\" /SetAsDefaultAppGlobal"
"IconsVisible"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\shell\open\command]
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" -private"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\shell\properties]
@="Mozilla Firefox &Options"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\shell\properties\command]
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" -preferences"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\shell\safemode]
@="Mozilla Firefox &Safe Mode"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE_PRIVATE\shell\safemode\command]
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" -safe-mode"
[HKEY_CLASSES_ROOT\FirefoxHTMLPrivate]
@="Firefox Private HTML Document"
"FriendlyTypeName"="Firefox Private HTML Document"
"EditFlags"=dword:00000002
[HKEY_CLASSES_ROOT\FirefoxHTMLPrivate\DefaultIcon]
@="C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe,6"
[HKEY_CLASSES_ROOT\FirefoxHTMLPrivate\shell]
@="open"
[HKEY_CLASSES_ROOT\FirefoxHTMLPrivate\shell\open]
[HKEY_CLASSES_ROOT\FirefoxHTMLPrivate\shell\open\command]
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" -private -osint -url \"%1\""
[HKEY_CLASSES_ROOT\FirefoxHTMLPrivate\shell\open\ddeexec]
@=""
[HKEY_CLASSES_ROOT\FirefoxURLPrivate]
@="Firefox Private URL"
"FriendlyTypeName"="Firefox Private URL"
"URL Protocol"=""
"EditFlags"=dword:00000002
[HKEY_CLASSES_ROOT\FirefoxURLPrivate\DefaultIcon]
@="C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe,6"
[HKEY_CLASSES_ROOT\FirefoxURLPrivate\shell]
@="open"
[HKEY_CLASSES_ROOT\FirefoxURLPrivate\shell\open]
[HKEY_CLASSES_ROOT\FirefoxURLPrivate\shell\open\command]
@="\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\" -private -osint -url \"%1\""
[HKEY_CLASSES_ROOT\FirefoxURLPrivate\shell\open\ddeexec]
@=""
Windows Registry Editor Version 5.00
; This .reg file *should* restore missing chrome url/filetype handlers in windows 10.
; It was generated by exporting the relevant parts of my own registry at home. YMMV.
; If you want to add a 3rd handler for special cli parameters, diff this file vs
; the incognito handler--the only parts that need to be changed should be relatively easy to figure out.
[HKEY_CLASSES_ROOT\ChromeHTML]
@="Chrome HTML Document"
"AppUserModelId"="Chrome"
[HKEY_CLASSES_ROOT\ChromeHTML\Application]
"AppUserModelId"="Chrome"
"ApplicationIcon"="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
"ApplicationName"="Google Chrome"
"ApplicationDescription"="Access the Internet"
"ApplicationCompany"="Google Inc."
[HKEY_CLASSES_ROOT\ChromeHTML\DefaultIcon]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
[HKEY_CLASSES_ROOT\ChromeHTML\shell]
[HKEY_CLASSES_ROOT\ChromeHTML\shell\open]
[HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" -- \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome]
@="Google Chrome"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\Capabilities]
"ApplicationDescription"="Google Chrome is a web browser that runs webpages and applications with lightning speed. It's fast, stable, and easy to use. Browse the web more safely with malware and phishing protection built into Google Chrome."
"ApplicationIcon"="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
"ApplicationName"="Google Chrome"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\Capabilities\FileAssociations]
".htm"="ChromeHTML"
".html"="ChromeHTML"
".shtml"="ChromeHTML"
".xht"="ChromeHTML"
".xhtml"="ChromeHTML"
".webp"="ChromeHTML"
".pdf"="ChromeHTML"
".svg"="ChromeHTML"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\Capabilities\Startmenu]
"StartMenuInternet"="Google Chrome"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\Capabilities\URLAssociations]
"ftp"="ChromeHTML"
"http"="ChromeHTML"
"https"="ChromeHTML"
"irc"="ChromeHTML"
"mailto"="ChromeHTML"
"mms"="ChromeHTML"
"news"="ChromeHTML"
"nntp"="ChromeHTML"
"sms"="ChromeHTML"
"smsto"="ChromeHTML"
"tel"="ChromeHTML"
"urn"="ChromeHTML"
"webcal"="ChromeHTML"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\DefaultIcon]
@="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe,0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\InstallInfo]
"ReinstallCommand"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --make-default-browser"
"HideIconsCommand"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --hide-icons"
"ShowIconsCommand"="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --show-icons"
"IconsVisible"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\Google Chrome\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\RegisteredApplications]
"Google Chrome"="Software\\Clients\\StartMenuInternet\\Google Chrome\\Capabilities"
@lopee
Copy link

lopee commented Oct 5, 2020

Would you please tell me how to add other command lines of Chrome in the Registry(windows10 1809, chrome 85)?
Thank you very much !

@Efreak
Copy link
Author

Efreak commented Oct 8, 2020

I don't use chrome anymore. All I know about this registry entry is that Microsoft decided not to use a standard protocol handler entry for this, so it's annoying to deal with (I miss the file types dialog and being able to show a full list of registered file types)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment