We are having trouble adding our batch scripts to the new Windows 7 taskar.

Our batchfiles take some arguments and just execute other application based on those arguments . To keep it simple, we created some shortcuts for our customers which they just need to click in order to get everything running.

The question here is: How can we pin those shortcuts or batch files to the taskbar?

(The customers aren't supposed to access the file system and that's why they can only see the taskbar)

link|improve this question

50% accept rate
feedback

4 Answers

up vote 31 down vote accepted

Just becouse this question was shown in my top search hits I'll post solution that I've just researched:

  1. Create shortcut to your batch file
  2. Get into shortcut property and change target to something like that: cmd.exe /C "path-to-your-batch"
  3. Simply drag your new shortcut into a taskbar, it should be now pinnable
link|improve this answer
Such a simple solution. Strange that pinning of direct shortcuts to batch files is not supported. – Steve Crane Feb 7 '11 at 8:16
This should be marked as "Answer"... – noocyte May 6 '11 at 8:34
Unfortunately if you have multiple batch files to pin, they don't stack similar to how explorer pins work. – Jeff Mercado yesterday
feedback

Yes this is an annoying "feature" of the windows 7 taskbar. I built a simple application that runs batch files which you can pin to your taskbar and pin batch files to it. It gets the job done. Download it for free -> http://johnastevens.com/helpTopics.aspx#batchapp

link|improve this answer
1  
Works like a charm. The only thing missing is that when you just click RunBatch it does nothing, it would be nice if it opens the command prompt. – Jochen Jan 5 '11 at 14:35
1  
Thanks for taking the effort to write and make this available but it seems a bit of an over the top approach when the solution given by Kamil Klimek is so simple. – Steve Crane Feb 7 '11 at 8:15
feedback

The folder for the Windows 7 taskbar is located at:

C:\Users\USER_NAME\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

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.

link|improve this answer
1  
This approach didn't work with shortcuts.. – Shaharyar Jan 25 '10 at 12:36
Also tried adding a new shortcut here, and it did not show up in the taskbar after restarting explorer.exe. – eidylon May 24 '10 at 14:38
feedback

This thread nearly answers my problem, another thread worth reading that solves these issues in a different way is here: http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/a44e74a1-20cd-4924-8f2b-3e6b688f1ad7/

the best other way is this: I was able to add a batchfile to the taskbar by the following steps 1. Renaming your .cmd/.bat to to .exe 2 right click on the *.exe and choose pin to taskbar 3. rename it back to .cmd/.bat 4. shift+right click the taskbar icon (for the exe) and choose properties 5. Change the reference from *.exe to .cmd/.bat and change icon as needed 6. 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)."

link|improve this answer
feedback

protected by studiohack Apr 27 '11 at 1:13

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.