I'm trying to create a Windows shortcut that will be put in my startup folder. The shortcut starts a program (Discord), but with a 1-minute delay. I'm doing this because my (ancient) core i3-2100 PC that I forced to run Windows 11 Pro gets laggy when there are a bunch of programs that open during startup. My custom shortcut will minimalize the lag. The shortcut opens Windows Powershell and runs a command, but I'm having trouble typing the full path (that has some parameters) in the Target box from the shortcut's properties due to the character limit.
This what I'm trying to type into the Target box:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -WindowStyle Hidden -Command "Start-Sleep -Seconds 60 ; Start-Process 'C:\Users\User\AppData\Local\Discord\Update.exe' -ArgumentList '--processStart Discord.exe', '--process-start-args --start-minimized'"
I've tried to bypass the character limit by:
- Enabling Win32 long paths via Local Group Policy Editor
- Setting LongPathsEnabled to 1 via Registry Editor
Unfortunately, all of those methods didn't work.
Is there something I'm missing or should I consider creating a VBS or batch file instead?
powershell ...
instead, making it a lot shorter. If you make it start where your discord is, you can also remove the path for discord too.C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
by itself and cut the string. Typing "cmd" has similar results; it turns into the full path.