Last active
August 30, 2020 14:57
-
-
Save marcosbozzani/1750f83c4f85e83b9e3b1b3177deaa01 to your computer and use it in GitHub Desktop.
Windows Send To: Startup (create shortcut)
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
| <!-- : Begin batch script | |
| @echo off | |
| cscript //nologo "%~f0?.wsf" "%UserProfile%\Start Menu\Programs\Startup\%~n1.lnk" "%~f1" | |
| exit /b | |
| ----- Begin wsf script ---> | |
| <job> | |
| <script language="JScript"> | |
| var link = WScript.Arguments.Item(0); | |
| var target = WScript.Arguments.Item(1); | |
| var shell = WScript.CreateObject("WScript.Shell"); | |
| var shortcut = shell.CreateShortcut(link); | |
| shortcut.TargetPath = target; | |
| shortcut.Save(); | |
| </script> | |
| </job> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment