Skip to content

Instantly share code, notes, and snippets.

@seraphy
Created February 27, 2019 09:27
Show Gist options
  • Select an option

  • Save seraphy/a9236cbc6d13719bb719e227f5b80819 to your computer and use it in GitHub Desktop.

Select an option

Save seraphy/a9236cbc6d13719bb719e227f5b80819 to your computer and use it in GitHub Desktop.
VBSからショートカットをデスクトップに作成する方法。https://support.microsoft.com/ja-jp/help/244677/how-to-create-a-desktop-shortcut-with-the-windows-script-host
rem VBSからショートカットをデスクトップに作成する方法
rem https://support.microsoft.com/ja-jp/help/244677/how-to-create-a-desktop-shortcut-with-the-windows-script-host
dim WshShell, strDesktop, oMyShortCut
set WshShell = CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oMyShortCut = WshShell.CreateShortcut(strDesktop + "\edit setenv.cmd.lnk")
oMyShortCut.WindowStyle = 4
rem oMyShortcut.IconLocation = home() + "wizards\graphics\builder.ico"
oMyShortCut.TargetPath = "C:\Windows\System32\notepad.exe"
oMyShortCut.Arguments = "c:\java\setenv.cmd"
oMyShortCut.WorkingDirectory = "c:\java"
oMyShortCut.Save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment