How to pin either a Shortcut or a Batch file to the new Windows 7, 8 and 10 Taskbar and start menu?
Solution 1:
- Create a shortcut to your batch file.
- Get into shortcut property and change target to something like:
cmd.exe /C "path-to-your-batch"
. - Simply drag your new shortcut to the taskbar. It should now be pinnable.
Solution 2:
This thread nearly answers my problem, another thread worth reading that solves these issues in a different way is here:Adding Batch Files to Windows 7 Taskbar like the Vista/XP Quick Launch
I was able to add a batchfile to the taskbar by the following steps:
- Renaming your .cmd/.bat to to .exe
- Right clicking on the *.exe and choose pin to taskbar
- Renaming it back to .cmd/.bat
- Shift+right clicking the taskbar icon (for the exe) and choose properties
- Changing the reference from *.exe to .cmd/.bat and change icon as needed
It starts working right away but the icon refresh needs a reboot.
I have an additional question though: how do you get a pinned taskbar batch file accepting another file as a parameter? It works when pinned onto the startbar, or just in the folder, but I can't get it working like it did on XP.
This is the functionality I'm talking about:
Drag and drop a file on the bat icon. The bat will receive the file name of the dropped file as %1 and vbscript will receive it as WScript.Arguments(0).
Solution 3:
The folder for the Windows 7 taskbar is located at:
C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
The Start Menu folder is:
C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu
You can create a shortcut there and upon logging off and back on, it should appear.
Hope this helps.... There are other things I should caution you about, for example, they can right click and edit the batch file - so, you may want to look at NTFS permissions for locking down the file.