I finally found a workable solution thanks to this post:
chrome https://www.google.com/_/chrome/newtab
or
start chrome https://www.google.com/_/chrome/newtab
(Don't ask me why/how this opens chrome://newtab
)
The address bar would not auto-focus for me with this method like it did when opening the new tab in a new window, so I came up with a workaround. I put the command to open the new tab page into a batch file, and added a command to send Ctrl+L (the shortcut to focus the address bar) using SendKeys
(taken from this answer).
This is my newtab.bat file, which I run using my shortcut button:
@if (@CodeSection == @Batch) @then
@echo off
SET SendKeys=CScript //nologo //E:JScript "%~F0"
SET KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe"
FOR /F "tokens=2* delims= " %%A IN ('REG QUERY %KEY_NAME% /ve') DO SET Chrome=%%B
"%Chrome%" "https://www.google.com/_/chrome/newtab"
%SendKeys% "^l"
goto :EOF
@end
// JScript section
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));
It performs these steps:
- Get the Chrome executable path from the registry
- Run Chrome, opening the
newtab
page in the existing window
- Send Ctrl+L to focus the address bar