You can pin executable file (.exe) or folder to Start Menu and Taskbar but you cannot do that to batch file. These are methods to make batch file appear in them:
Method 1: Create shortcut wizard
- In Desktop (or directory, folder), right-click on blank space to display Context Menu ➞ New ➞ Shortcut
- A Create Shortcut Wizard window will open
- Type this in text box:
cmd /c "path/your_file.bat"
Use /k instead of /c if you do not want console to close when file is executed successfully. You can run many commands at once by using & or && to separate between commands.
cmd /c "path/your_file.bat" & ping google.com
cmd /c "path/your_file.bat" && ping google.com
-> use && if you want the commands to execute in order, the second will wait for the first to be executed successfully.
- Click Next
- Type your shortcut name
- Click Finish
- Now you have shortcut in Desktop. You can right-click on shortcut to pin it to Start Menu or Taskbar.
Method 2: Add your shortcut directly to Start Menu folder
- Right-click on your batch file to open Context Menu ➞ Send To ➞ Desktop (create shortcut)
- Now we have shortcut of your batch file on Desktop (ex: my_file.bat). We will move it to this folder C:\Users\<your-account-name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs.
- Your shortcut will appear in Start Menu, though it will not be on the tile layout, but on the left sidebar of list app.
- If you want to change to a tile, you can use this tip.
- Right-click on your shortcut in Desktop, open Context Menu➞ Properties.
- You changes Target textbox to
cmdthen click OK. Now your shortcut links to cmd.exe, so you can right-click and be able to pin it to Start Menu.
- Your shortcut will appear in C:\Users\<your-account-name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs, you can do that again for this shortcut to change Target to your batch file.