User Tools

Site Tools


Sendto Startup

Add the ability to add a program to the Startup folder using the SendTo context menu.

Save the following code somewhere:

$Name = Split-Path -Path $Path -leaf
$Shell = New-Object -ComObject ("WScript.Shell")
$ShortCut = $Shell.CreateShortcut($env:APPDATA + "\Microsoft\Windows\Start Menu\Programs\Startup\$Name.lnk")
$ShortCut.TargetPath = $Path

Then create a shortcut in: %APPDATA%\Microsoft\Windows\SendTo with the target set to %windir%\System32\WindowsPowerShell\v1.0\powershell.exe -File “C:\path\to\Startup.ps1” and set the icon to what you want.

Note: Can save the Startup.ps1 file to the SendTo folder if desired, because it doesn't show up in the list itself.

win/sendto_startup.txt · Last modified: 2018/07/13 18:03 by derek