Created
June 20, 2013 20:12
-
-
Save shoover/5826184 to your computer and use it in GitHub Desktop.
Load a URL in Chrome as a new tab in a specific user profile's window
This file contains hidden or 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
' Load a URL in Chrome as a new tab in a specific user profile's window. | |
' usage: chromes PROFILE [URL] | |
' PROFILE can be a keyword to be translated in the lookup below. | |
Set oShell = CreateObject ("Wscript.Shell") | |
Dim profile, url, cmd, args | |
profile = WScript.Arguments(0) | |
Select Case LCase(profile) | |
Case "personal" profile = "Default" | |
Case "work" profile = "Profile 2" | |
End Select | |
If WScript.Arguments.Count > 1 Then | |
url = WScript.Arguments(1) | |
Else | |
url = "www.google.com" | |
End If | |
cmd = "%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe" | |
args = " --profile-directory=""" & profile & """ " & url | |
oShell.Run cmd & args , 0, true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment