Created
February 13, 2018 14:41
-
-
Save t3knoid/e3b4fc9b8161e7ac3bdcd71937c0b325 to your computer and use it in GitHub Desktop.
A VBScript that creates a shortcut in Windows
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
set objWSHShell = CreateObject("WScript.Shell") | |
'=========================================== | |
' usage: cscript makeLNK.vbs shortcut target | |
'============================================ | |
sShortcut = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(0)) | |
sTargetPath = objWSHShell.ExpandEnvironmentStrings(WScript.Arguments.Item(1)) | |
set objSC = objWSHShell.CreateShortcut(sShortcut) | |
objSC.TargetPath = sTargetPath | |
objSC.Save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment