Home > Mobile >  Batch Script / CMD ( Open any link In a Specific Google Chrome Profile )
Batch Script / CMD ( Open any link In a Specific Google Chrome Profile )

Time:07-05

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

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

I know the below code wont work as I want it to work. Help me to make it work !

@ECHO OFF
START https://www.youtube.com
START https://www.facebook.com
PAUSE > NUL
EXIT

My Google Chrome Installation Path

C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

CodePudding user response:

NEW ANSWER: If i understood, you want to open a link on chrome with batch-file in different chrome profiles, if that's the problem, i can help you. Before asking a question here, i recommend doing a search on a search engine (like Google) or on YouTube. By doing some research i found a video that may help you: https://www.youtube.com/watch?v=XLmTo_O3hjU (not uploaded by me) , anyways, Here is the solution: your code is trying to open https://www.youtube.com with the the system's default broswer. To open that link with chrome's different profiles you need to change the code:

START "" "C:\Program Files\Google\Chrome\Application\Chrome.exe" https://www.youtube.com --profile-directory="Profile 1"

So your code will be:

@ECHO OFF
START "" "C:\Program Files\Google\Chrome\Application\Chrome.exe" https://www.youtube.com --profile-directory="Profile 1"
START "" "C:\Program Files\Google\Chrome\Application\Chrome.exe" https://www.youtube.com --profile-directory="Profile 2"
PAUSE > NUL
EXIT

If it doesn't work, try changing the chrome path (i writed the usual default path) and tell me if it works. Hope i've been helpful, if not, leave a comment and i will try to re-edit the answer.

CodePudding user response:

For Any One With The Same Problem . . .

This Code Below Work !

Just be sure to change the Google Installation Location according to your computer. And change the link to anything you want to use. Also don't forget to set the correct Google Profile profile name . . .

START "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" https://www.anycustomlink.com --profile-directory="Profile_name"

The Code Below Will Open YouTube With The Third Google Chrome Profile !

START "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" https://www.youtube.com --profile-directory="Profile 3"

Thanks A Lot Again @ArraffaFile

  • Related