[!IMPORTANT] None of the tips and by-passing from various sites actually works in Window 11!
Create a shortcut to
cmd.exeand copy it to taskbar. THEN edit the shortcut on the taskbar to run your script!
Make a directory for you shortcuts and icon like %HOMEPATH%\links
Create your shortcut in this directory and add a new icon.
The link will be stored in %USERPROFILE%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
If there is no “Pin to..” entries you will have to prefix the target with
C:\Windows\System32\cmd.exe in order to “persuade” Window to accept the link on startup and taskbar.
Start in: %HOMEDRIVE%%HOMEPATH%
Use PowerShell:
ls "$env:APPDATA\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"Remove-Item "$env:APPDATA\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*" -Force
(Note: Windows 10 Forums suggests needing to restart explorer.exe for changes to take effect).</del>