Skip to content

Instantly share code, notes, and snippets.

@ravuthz
Created November 3, 2020 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravuthz/e4435888819f62df992f91acea02725d to your computer and use it in GitHub Desktop.
Save ravuthz/e4435888819f62df992f91acea02725d to your computer and use it in GitHub Desktop.
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set fs = WScript.CreateObject("Scripting.FileSystemObject")
Function MakeDesktopShortcut( name, target, arguments )
Dim Shortcut,DesktopPath,StartupPath
DesktopPath = WSHShell.SpecialFolders("Desktop")
Set Shortcut = WSHShell.CreateShortcut(DesktopPath & "\" & name & ".lnk")
Shortcut.TargetPath = target
Shortcut.Arguments = arguments
Shortcut.Save
End Function
Dim x
Dim p
For x = 1 to 3
p = Replace("""Profile $n""", "$n", x)
MakeDesktopShortcut "Chrome " & x, "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "--profile-directory=" & p
Next
MakeDesktopShortcut "Note" & x, "C:\Windows\notepad.exe", ""
MakeDesktopShortcut "Google", "https://www.google.com", ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment