Created
July 13, 2022 18:42
-
-
Save ciphertxt/bf17716b2ca3c391a998f206abb9f08e to your computer and use it in GitHub Desktop.
Opens a specific Microsoft Edge profile by name on macOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Navigate to the profiles directory | |
cd ~/Library/Application\ Support/Microsoft\ Edge | |
# List out the profile directories. Note that the directory name is what is used in the launch command, *not* necessarily the friendly name of the profile you see in Microsoft Edge.app | |
find ./ -type f -name Preferences | |
# Let's say "Profile 1" is one of our directories | |
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" --profile-directory="Profile 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This AppleScript seems to work for me:
do shell script "open -na 'Microsoft Edge' --args --profile-directory='PROFILE_NAME' --new-window 'https://google.com'"
I have three profiles: "Default", "Profile 1", and "Profile 5" and it works with all three. Including the
--new-window
argument causes it to always open a new window. Omitting this will cause the URL to be opened in a new tab if there is already an open window from that profile, or a new window otherwise.(edited to clean up some mistakes)