User Tools

Site Tools


win:sendto_startup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
win:sendto_startup [2018/07/13 18:03]
derek
win:sendto_startup [2024/09/22 19:51] (current)
Line 1: Line 1:
 =====Sendto Startup===== =====Sendto Startup=====
- 
 Add the ability to add a program to the Startup folder using the SendTo context menu. Add the ability to add a program to the Startup folder using the SendTo context menu.
  
-Save the following code somewhere: +====Setup==== 
-<code powershell Startup.ps1> +  * Navigate to ''%APPDATA%\Microsoft\Windows\SendTo'' 
-param([System.IO.FileInfo]$Path) +  * Save [[https://github.com/Archer4499/Configs/raw/master/Windows/Apps/Scripts/Startup.ps1|Startup.ps1]] here 
-$Name Split-Path -Path $Path -leaf +  * Right-Click > ''New'' > ''Shortcut'': 
-$Shell New-Object -ComObject ("WScript.Shell"+    * ''Location of the item''''%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -File %APPDATA%\Microsoft\Windows\SendTo\Startup.ps1'' 
-$ShortCut $Shell.CreateShortcut($env:APPDATA + "\Microsoft\Windows\Start Menu\Programs\Startup\$Name.lnk"+    * ''Name''''Startup'' 
-$ShortCut.TargetPath $Path +  * Right-Click the shortcut > ''Properties'' > ''Run'' > ''Minimised''
-$ShortCut.Save() +
-</code> +
- +
-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.1531505031.txt.gz · Last modified: 2024/09/22 19:51 (external edit)