user5232147
user5232147

Reputation: 151

How to pin to start menu using a batch file (Windows 10)

I need to pin an executable into the new Windows 10 start menu (i.e. creating a tile).

I'm aware of PowerShell scripts that do the job, but I need some instructions to add at the end of an existing batch file (cmd) we already use for installing our applications.

The usual scripts (valid for Windows 8 and 8.1) simply don't work. How can I do this?

Upvotes: 14

Views: 34764

Answers (5)

Carlos
Carlos

Reputation: 11

Follow my original method, and you will get .bat file{s} pinned in Taskbar. WORKS 100%

Step 1: Create shortcut of your .bat file (for example in Desktop “C:\Users\youruser\Desktop\yourfile.bat”). So you will end up with “yourfile.bat – Shortcut.lnk” (you might not see extension “.lnk”).

Step 2: Right Click your shortcut and change your Target field from: “C:\Users\youruser\Desktop\yourfile.bat” to: explorer “C:\Users\youruser\Desktop\yourfile.bat” – note: explorer is the explorer.exe app. You can also write the full Path: C:\Windows\explorer.exe, for no confusion.

Step 3: Now Right Click your shortcut and now you can see the option Pin to Taskbar.

Step 4: Right Click the pinned shortcut, and you will see two options: shortcut itself and unpin option. Right Click the shortcut and select Properties. From Target field delete “C:\Windows\explorer.exe” and leave only “C:\Users\youruser\Desktop\yourfile.bat”, and click OK

Now you can delete your shortcut in Desktop, since now you have your standalone shortcut on Taskbar Optionaly, if you want to change Icon do Step 4, but now click “Change Icon…” button, and choose your custom Icon, from some other exe file or .ico file.

That’s it! Now you have fully functional batch file shortcut on Taskbar

Upvotes: 1

npocmaka
npocmaka

Reputation: 57262

Note: I've wrote and tested this on windows 8 - you might face issues on windows 10.

Check this. This a JScript/bat hybrid that uses the shellapplication object and invokeverb function (i.e. emulates right click and chooses some specific actions). It is now compatible with Windows 10.

Use it like this (you can use also a shortcut/.lnk to an exe):

call pinnerJS.bat "%windir%\system32\cmd.exe" startmenu

Upvotes: 6

Ru8ik
Ru8ik

Reputation: 335

The way it works on Windows 10 after trying almost 15 different methods that didn't work for me

  1. Go to your desktop -> right-click -> Create New Shortcut

  2. In the shortcut target type the following text:

     cmd /c "full path to your batch file" 
    

    It will look something like this:

    cmd /c "C:\Users\Jmeter\Desktop\jmeter.bat"
    
  3. Name the shortcut.

  4. Right-click on the shortcut -> select Pin to taskbar. If you'd prefer it pinned to your Start menu, select Pin to start instead.

Bonus: Download some .png image -> Go here (https://icoconvert.com/) -> convert to Windows icon file -> set as new icon

Upvotes: 16

antogerva
antogerva

Reputation: 559

Right now, you can't do this with free tools (maybe Windows want to get into the "pay2tile" business model).

One possible option at the moment would be to use Classic Shell.

Upvotes: 0

Rich
Rich

Reputation: 299

This is a kludge work around that Microsoft needs to fix, but it worked for me.

Temporary rename the .bat file to .exe. Then right click on the file name. It will give you the Pin to start option. Pin it to the start menu. It won't work, but there is an option open the file location. Select that and change the name back to .bat. Now it works.

Upvotes: 29

Related Questions