Skip to content

Instantly share code, notes, and snippets.

@shikishima
Created December 8, 2021 11:01
Show Gist options
  • Select an option

  • Save shikishima/f9d4bf8364ef1a1abf434e39d9712fb4 to your computer and use it in GitHub Desktop.

Select an option

Save shikishima/f9d4bf8364ef1a1abf434e39d9712fb4 to your computer and use it in GitHub Desktop.
Edgeのプロファイルを指定して起動するVBSファイル
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshFso = WScript.CreateObject("Scripting.FileSystemObject")
EDGE_EXE = WshShell.ExpandEnvironmentStrings("%ProgramFiles(x86)%\Microsoft\Edge\Application\msedge.exe")
SHARE_DIR = WshShell.ExpandEnvironmentStrings("%HOME%\opt\share\")
EDGE_PROFILE_DIR = SHARE_DIR + "edge\profile\"
If Not WshFso.FolderExists(EDGE_PROFILE_DIR) Then
WshShell.Run("%ComSpec% /c md " + EDGE_PROFILE_DIR)
End If
WshShell.Run("""" + EDGE_EXE + """" + " --user-data-dir=" + EDGE_PROFILE_DIR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment