Skip to content

Instantly share code, notes, and snippets.

@Adanteh
Last active September 1, 2020 17:23
Show Gist options
  • Select an option

  • Save Adanteh/450c9e46e637bf841b3930dfc76832b2 to your computer and use it in GitHub Desktop.

Select an option

Save Adanteh/450c9e46e637bf841b3930dfc76832b2 to your computer and use it in GitHub Desktop.
Send to start menu programs
@echo off
Set my_file=%~1
Set program_name=%~n1
@powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Start Menu.ps1" %my_file% %program_name%
# Create a Shortcut with Windows PowerShell
$TargetFile = $args[0]
$TargetName = $args[1]
$startmenu = [Environment]::GetFolderPath("StartMenu")
$ShortcutFile = "$startmenu\Programs\$TargetName.lnk"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.Save()

Allows Right Click>Send To>Start menu

This is a little script allowing you to right click add programs to the start menu. This adds them to the Programs list, instead of pinning them to start I mainly use it for portable programs

Usage

First open up Run (Windows+R key) and type shell:sendto

Then create a new file in this folder called Start Menu.bat and copy contents of file in it. Then create another file called Start Menu.ps1 and do the same with the other file

You should now be able to Right Click any folder or file, go to Send To and click Start Menu. It's nothing you can't do manually, but I find it's a useful option to have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment