如何使用 Windows 中的 BATCH 脚本在特定 "profile" 中打开浏览器?

How do I open browser in specific "profile" using BATCH script in Windows?

这里是我用来打开具体URL

的shell脚本
   start microsoft-edge: https://whosebug.com/questions/ask

但是,我在 Edge 浏览器中定义了多个 Profiles

如何根据 Profile 名称打开浏览器?如何在脚本中传递 Profile 名称或路径?

我在 linux 所以我无法测试它,但你可以使用这些参数之一进行测试:

--user-data-dir="C:\ChromeBrowser_profiles\Profile_edge"

--profile-directory="Profile 4"

您可以使用 --profile-directory="Profile name" 打开具有特定配置文件的 Edge。

批处理文件的示例代码如下:

start "" "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" https://whosebug.com/questions/ask --profile-directory="Profile 1"

注意:请将 Edge 路径和配置文件名称编辑为您自己的。