How to open a link in chrome from cmd (Windows) without causing a chrome window in the foreground?

For example, if I click the link in the vscode editor, this does not interfere with what I am doing now - it opens it without making the chrome window active.

I want to achieve the same from the command line from windows using one of: cmd, msys bash, powershell.

There is a similar question , but without a foreground requirement.

+4
source share
4 answers

I see a solution here, however, there seems to be no direct way to open links in chrome without bringing a chrome window in the foreground.

Chrome. --remote-debugging-port=9222. , . API. , . node: chrome-remote-interface.

, vscode, chrome.

, , script, .

: ( , ). chrome API ( , ).

0

.bat Windows. , Chrome, Chrome.exe, , .

, cd C:\Program Files (x86)\Google\Chrome\Application

chrome.exe www.yahoo.com

, .

0

, PowerShell :

Start-Process -WindowStyle Hidden "chrome.exe" "www.google.com"

Start-Process -WindowStyle Minimized "chrome.exe" "www.google.com"
0

cmd:
Chrome: start chrome https://www.google.com
Firefox: start firefox https://www.google.com

0
source

Source: https://habr.com/ru/post/1673221/


All Articles