批处理脚本 / CMD [在不同的Google Chrome配置文件中打开两个不同的链接]

发布于 2025-02-12 22:42:41 字数 1551 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

纸伞微斜 2025-02-19 22:42:41

对于任何有相同问题的人。 。 。

此代码以下工作!

只需确保根据计算机更改Google安装位置即可。并将链接更改为您要使用的任何东西。也不要忘记设置正确的Google配置文件名称。 。 。

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

下面的代码将使用第三个Google Chrome配置文件打开YouTube!

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

再次感谢@Arraffafile

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

你好,陌生人 2025-02-19 22:42:41

新答案:如果我理解,您想在Chrome上与不同的Chrome配置文件打开一个链接,如果这是问题的话,我可以为您提供帮助。在此处提出问题之前,我建议您在搜索引擎(例如Google)或YouTube上进行搜索。通过进行一些研究,我找到了一个可能对您有帮助的视频: https://www.youtube.com /watch?v = xlmto_o3hju (我不上传),无论如何,这是解决方案:
您的代码正在尝试打开 https://www.youtube.com 带有系统的默认broswer。要使用Chrome的不同配置文件打开该链接,您需要更改代码:

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

因此,您的代码将是:

@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

如果它不起作用,请尝试更改Chrome路径(我写了通常的默认路径),并告诉我它是否有效。希望我一直有帮助,如果没有,请发表评论,我会尝试重新编辑答案。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文