$WshShell = New-Object -ComObject WScript.Shell $shortcutPath = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\MyApp.lnk" $shortcut = $WshShell.CreateShortcut($shortcutPath) $shortcut.TargetPath = "D:\Tools\myapp.exe" $shortcut.WorkingDirectory = "D:\Tools" $shortcut.IconLocation = "D:\Tools\myapp.exe,0" $shortcut.Save()
The User pressed Win + R and typed the secret incantation: shell:programs . A hidden gateway opened to the folder. add shortcut to start menu
Now, Project X wasn't just a file in a folder. It was a VIP. Whenever the User pressed the Windows key, Project X was right there, ready to work, living happily ever after in the most prestigious real estate on the hard drive. Customize the Windows Start Menu - Microsoft Support $WshShell = New-Object -ComObject WScript
: With a decisive right-click, the User summoned the Context Menu. There, glowing like a beacon of hope, was the command: Pin to Start . Project X was right there