The Computer Oracle

Shortcut to batch file cannot be pinned to Win10 Start menu

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Track title: CC L Beethoven - Piano Sonata No 8 in C

--

Chapters
00:00 Shortcut To Batch File Cannot Be Pinned To Win10 Start Menu
00:20 Accepted Answer Score 73
00:39 Answer 2 Score 11
01:12 Answer 3 Score 1
01:35 Answer 4 Score 0
01:54 Answer 5 Score 0
02:39 Thank you

--

Full question
https://superuser.com/questions/1289948/...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#windows10 #batchfile #startmenu

#avk47



ACCEPTED ANSWER

Score 73


After you create the shortcut go to Properties and in the Target field add cmd /c "path", then you can pin it by right clicking on the shortcut and selecting Pin ...

enter image description here




ANSWER 2

Score 11


  1. Create a directory in %appdata%/Microsoft/Windows/Start Menu/Programs/ (e.g. Custom);
  2. Create a shortcut to a batch/executable/target in the directory;
    2.1. (Optional) Wait for 5-20 seconds so the OS could handle the changes;
  3. Open Start Menu;
  4. Search for the shortcut using Start Menu;
  5. Right click on the result and press Pin to Start.



ANSWER 3

Score 1


Update: I used the suggestion above and Windows 10 force modified my path to C:\Windows\System32\cmd.exe /c" C:\pathto\batch.bat". This works for me.




ANSWER 4

Score 0


Create the shortcut file in a folder other than Programs. Then copy/move that shortcut into the Programs folder. You may need to provide admin credentials, but it'll work.




ANSWER 5

Score 0


This answer provides additional details to the solutions by @User552853 and @Angel and a workaround when updates are needed.

The solution by @User552853 ends up copying the shortcut to %AppData%\Microsoft\Windows\Start Menu\Programs, meaning that the Start Menu link is different than the original shortcut created in the answer. This is important to keep in mind because updates to the original shortcut won't be reflected when the Start Menu shortcut is clicked. My workaround is:

  1. Delete the Start Menu shortcut
  2. Right click on the original (but modified) shortcut and select Pin to Start

Pinning to taskbar works in a similar but copies the shortcut to a different folder.