-1

I want to open two different links both in different google chrome profiles using batch script file.

eg.: https://www.youtube.com in profile no 1 & https://skribbl.io in profile no 2

So I can watch YouTube in the first profile and play games in the second profile.

I have 2 screens just need the batch script to start both links.

And yes I play a lot skribbl.io while watching YouTube videos on my other screen !

1 Answers1

0
@ECHO OFF

REM DETERMIN GOOGLE INSTALLATION PATH

IF EXIST "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" (
SET INSTALL="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
GOTO :START
)
IF EXIST "C:\Program Files\Google\Chrome\Application\chrome.exe" (
SET INSTALL="C:\Program Files\Google\Chrome\Application\chrome.exe"
GOTO :START
)

:START

REM OPEN LINKS

START "" %INSTALL% https://www.youtube.com --profile-directory="Profile 1"

START "" %INSTALL% https://skribbl.io --profile-directory="Profile 2"

EXIT
  • What does happen if user has installed *Google Chrome* neither into the directory `C:\Program Files (x86)\Google\Chrome` nor into the directory `C:\Program Files\Google\Chrome` which of course is possible? You have luck that the installer of *Google Chrome* makes an [application registration](https://docs.microsoft.com/en-us/windows/win32/shell/app-registration) in any case and for that reason there can be simply used `@START "" chrome.exe https://www.youtube.com --profile-directory="Profile 1"` and `@START "" chrome.exe https://skribbl.io --profile-directory="Profile 2"` and nothing else. – Mofi Jul 13 '22 at 19:33
  • For more details see [Where is "START" searching for executables?](https://stackoverflow.com/a/27386403/3074564) – Mofi Jul 13 '22 at 19:34