Skip to content

Instantly share code, notes, and snippets.

@marcosbozzani
Last active August 30, 2020 14:57
Show Gist options
  • Select an option

  • Save marcosbozzani/1750f83c4f85e83b9e3b1b3177deaa01 to your computer and use it in GitHub Desktop.

Select an option

Save marcosbozzani/1750f83c4f85e83b9e3b1b3177deaa01 to your computer and use it in GitHub Desktop.
Windows Send To: Startup (create shortcut)
<!-- : 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