Does anyone know how to launch chrome and immediately open a "chrome url"?
I'm trying to make a shortcut like this, but its not working when I tried. it only accepts http:// urls
GoogleChromePortable.exe "chrome://settings/" Thanks in advance who can help out
34 Answers
OK, so I finally figured out a "hack". This hack requires creating an extension to handle the request. I already tried quite a few attempts to "hijack" Chrome with an easier way but seems that Chrome is secure enough to stop me from doing that and this is the closest I can get.
First, create an empty directory somewhere accessible on the hard drive.
Create a file manifest.json with the following content:
{ "name": "Open Chrome URLs", "version": "1.0", "manifest_version": 2 } Create a file open.html with the following content:
<html> <head> <title>Open Chrome URLs</title> <script type="text/javascript" src="open.js"></script> </head> <body> </body> </html> Create a file open.js with the following content:
window.addEventListener("load", function(){ var key = "secretKey"; // replace "secretKey" with your own secret key if(window.location.search == "?key=" + key && window.location.hash.length > 1){ chrome.tabs.update({ 'url': "chrome://" + window.location.hash.substr(1) + "/" }); }else{ document.body.appendChild(document.createTextNode("Invalid")); } }); Replace the secret key with your own if wanted.
Then, open the Extensions page (chrome://extensions/).
Check the "Developer mode" checkbox and click "Load unpacked extension" and select the directory that you just created.
You should now see a new extension appeared.

Copy the extension id.
Finally, start Chrome with the following URL as the parameter.
chrome-extension://nihlceAnywayPutTheExtensionIdHere/open.html?key=secretKey#settings Replace the first part with the extension id with the one you just copied.
Also replace the secretKey with the one you set above.
You can also use most of the other Chrome URLs instead of settings.
Note: you need a shortcut to Chrome instead of an Internet link.
Good luck!
3Here’s a very simple AutoHotkey solution:
WinActivate Chrome send ^t sleep 100 sendraw chrome://settings/ ; any URL works sleep 100 send {enter} Once chrome starts, go into the chrome://settings/ Url and then the option for on startup select use a specific URL. Put the chrome settings url there and click ok. You then select the bubble for that option and it will will start to that settings page. Now if you want this to be more of an alias solution simply copy the chrome binary and configs or if you are on mac os x copy the app package and do this with the second version or primary your choice. You should also rename the binary and configs but again there is always more than one way to do it. And then define your shortcut or alias accordingly.
1The following AutoHotkey script can be used for a variety of Chrome-based browsers.
; This script opens the "About" page in a Chrome-based Web browser ; ------------------------------------- ; To use a different Chrome variant, change the following variables EnvGet, pf, ProgramFiles(x86) ; For 64-bit browsers: ProgramW6432 dir = %pf%\Google\Chrome\Application ; Browser's drive and directory protocol = chrome ; Start of the URL, and also the name of the Windows process tabName = New Tab - Google Chrome ; How the browser names new tabs ; ------------------------------------- proc = %protocol%.exe ; Full name of the Windows executable file app = %dir%\%proc% ; Full path to the browser winTitle = ahk_exe %proc% ; Identify the window by the executable file's name Menu, Tray, Icon, %app% ; Use the browser's icon for this script Process, exist, %proc% ; See whether the browser is already running If NOT ErrorLevel ; Browser is not currently running, so run it Run, "%app%" WinWait, %winTitle%,, 200 If ErrorLevel { MsgBox, 48, Error, Browser window was not found.`n`nRef: %A_ScriptFullPath% Exit, 1 } WinActivate, %winTitle% Send ^t ; Open a new tab in the browser WinWait, %tabName%,, 20 If ErrorLevel ; The new browser tab was not found Exit, 1 Sleep, 100 WinActivate, %winTitle% Send %protocol%://settings/help{ENTER} ; Open the browser's "About" page Exit