none
Adding Batch Files to Windows 7 Taskbar like the Vista/XP Quick Launch

    Question

  • In earlier Windows (Vista, XP) - I used the quick launch for batch files. 

    All I needed to do to customize the quick launch was drag and drop
    the batch file (usually from the start menu) onto the quick launch and it would be added.

    With the new Windows 7 task bar- I can't drag and drop the batch files
    and use it like the old quick launch.

    How can I do this with the Windows 7 taskbar?

    thanks,
    -bill
    Thursday, February 12, 2009 5:18 PM

Answers

  • SoonerSkeene said:

    I was able to pin a shortcut to CMD to the taskbar.  I just hit the start button, typed "cmd" in the search box... right-clicked the result and chose "Pin to Taskbar"

    You are right, I was able to do that too.

    When I tried to use the same method to add parameters, /C <path to batch file>, the command line showed up in the search results.  I right clicked it and selected pin to taskbar, but the pinned shortcut only opened a command prompt and did not process the rest of the command line.

    I played some more and figured out how to do it.

    • First, pin a shortcut for cmd.exe to the taskbar, using the method SoonerSkeene told us about above.
    • Right click the shortcut on the taskbar.
    • You will see a list that includes "Command Prompt" and "Unpin this program from the taskbar".
    • Right click the icon for cmd and select properties.
    • In the box for Target, go to the end of "%SystemRoot%\system32\cmd.exe" and type " /C " and the path and name of the batch file.
    You can also change the Icon or click the General tab and change the name of the shortcut if you wish.
    Friday, February 13, 2009 8:24 PM

All replies

  • That is something I've wondered about too.  When you try to drop a .bat or .cmd file, it just shows the red circle with the line through it and you can't put it there like you could with the old Quick Launch in XP/Vista.

    Apparently Windows 7 doesn't have this ability and instead you're stuck with creating a "New Toolbar" and then putting your stuff in the folder you used to add the new toolbar.
    Thursday, February 12, 2009 7:39 PM
  • ted,, quick launch is availabe. I have it on my task bar and works great. look herehttp://www.sevenforums.com/tutorials/?ltr=Q&sort=&order=
    Friday, February 13, 2009 12:22 AM
  • I see what you mean.

    You can't even pin a shortcut for cmd.exe on the Taskbar.
    Friday, February 13, 2009 1:00 AM
  • Hi

    You can add bat files to taskbar, but in hard way (by using taskbar)


    1. Create new folder where you want and name it as you want

    2. Copy all BAT files into it

    3. Right click taskbar, then toolbars - > new toolbar 

    4. Browse to folder with BAT files and open it

    5. Do some gymnastic to adjust it as you want :)





    Friday, February 13, 2009 5:40 AM
  • I was able to pin a shortcut to CMD to the taskbar.  I just hit the start button, typed "cmd" in the search box... right-clicked the result and chose "Pin to Taskbar"
    Friday, February 13, 2009 5:55 AM
  • SoonerSkeene said:

    I was able to pin a shortcut to CMD to the taskbar.  I just hit the start button, typed "cmd" in the search box... right-clicked the result and chose "Pin to Taskbar"

    You are right, I was able to do that too.

    When I tried to use the same method to add parameters, /C <path to batch file>, the command line showed up in the search results.  I right clicked it and selected pin to taskbar, but the pinned shortcut only opened a command prompt and did not process the rest of the command line.

    I played some more and figured out how to do it.

    • First, pin a shortcut for cmd.exe to the taskbar, using the method SoonerSkeene told us about above.
    • Right click the shortcut on the taskbar.
    • You will see a list that includes "Command Prompt" and "Unpin this program from the taskbar".
    • Right click the icon for cmd and select properties.
    • In the box for Target, go to the end of "%SystemRoot%\system32\cmd.exe" and type " /C " and the path and name of the batch file.
    You can also change the Icon or click the General tab and change the name of the shortcut if you wish.
    Friday, February 13, 2009 8:24 PM
  • Thanks for the tip, but... the "ugh" remains that the motivation was to collapse the ultimate target program's icon *and* the cmd file onto the taskbar.  In my case, the launched program reveals a 2nd taskbar icon, so I gave up and went back to the old style Add Toolbars...
    Monday, May 11, 2009 3:34 PM
  • There is even better way to do it, simple as earlier for Quick launch.

    1. Press Start
    2. Type taskmgr
    3. In Task Manager window choose "New Task (Run...)" from "File" menu
    4. Type "Shell:user pinned"
    5. A hidden folder should pop up now
    6. Open the folder "TaskBar" to change, add or remove pinned icons
    hint:

    You can grab the folder iconfrom Windows Explorer address bar and drag it to pinned Windows Explorer icon on Taskbar and drop it while it says "Pin to Windows Explorer" for easier access later. Simply right-click the Windows Explorer icon and you should see the pinned folder on top of the list.

    Cheers,
    Codeplayer
    • Proposed as answer by BollyUK Friday, March 18, 2011 10:42 PM
    Monday, December 14, 2009 7:11 PM
  • Hmm.
    How is that easier than dragging it onto the quicklaunch bar again?

    Windows 7 - making simple tasks deceptively complicated again.

    6 steps to do what took 1 in XP.  That's an UPGRADE... change you can believe in!
    Monday, December 14, 2009 7:20 PM
  • No, it is certainly not easier, but i noticed, that the cmd /c command is kinda long way to do it. So I found this solution. I myself prefer 7 to XP. I hope it will catch up with the all the odd things like pinning custom suff to your taskbar. I still am quite offended by the fact that it costs twice more here in Europe than in U.S. Since I bought Vista and it was frozen half the time and other half of the time it was slow. With 7 there are really no problems, but I want to see some discount for the upgrade version as a peace offer from Microsoft :D But that is offtopic, I appologize.
    Monday, December 14, 2009 7:46 PM
  • I have your problem solved. You can go through all this heartache if your really stuck on it being a .bat file. What I did was just compile my batch files. The .exe's are only 20kb bigger, you can create a shortcut therefore being able to make the icon what you would like as well. And lastly the taskbar has no problem accepting .exe's or a .exe shortcut. Go to http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html?tag=mncol
    it's 100% free comes ready to use.
    open the program
    on the top theirs a box to browse for your file.
    press COMPILE
    done.

    No need to mess with any of the settings or anything works right out of the archive.
    • Proposed as answer by Jshmalchak Thursday, January 14, 2010 1:19 PM
    Thursday, January 14, 2010 1:01 PM
  • Let me make it clearer.
    1. Go to http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html?tag=mncol

    2. Download it. Open the archive you'll see...

    3. Bat_To_Exe_Converter.exe (you can run it while its still in the archive if you like)

    4. On the TOP RIGHT of the Bat_To_Exe_Converter.exe theirs a Browse... button. Click it and locate your .bat file.

    5. (OPTIONAL) Right below that box you should see the output path. Here you can rename your file(you can do this latter and it won't cause a problem).

    6. Press Compile....DONE!

    Now you should have 2 files with the same name with different file extention. ex....
    Mybatch.bat <- Keep in case you want to change latter
    Mybatch.exe <- Create a shortcut to this and pin to Task Bar

    Summary.
    Download Bat_To_Exe_Converter.exe.
    Open it and browse for your .bat file.
    Press Compile.
    Make a shortcut for your new .exe file.

    Got it?
    Monday, February 01, 2010 12:05 AM
  • BRIAN BORG'S WORKED GREAT FOR ME.

    I found it just as easy to make a shortcut on the desktop wit the old right click thingy. I just right clicked on the desktop and choose "New" and when the list comes up choose "shortcut". Then do as Brian Borg says and make the command line in the shortcut "CMD.EXE" and Windows 7 makes it change to "C:\Windows\System32\cmd.exe". Then follow the instructions for adding the /C and your path to the batch file like "C:\Windows\System32\cmd.exe /C C:\temp\mybatfile.bat" as the full command like and it runs (beautifully) any thing the batch file in "C:\temp\mybatfile.bat" has in it. Don't make any more than you need, just edit the batch file in C:\temp and keep the name of the batchfile the same and you can use it to run just about anything. I tried DOZENS of other suggestions and Brian Borg's was the best AND the only one that worked.

    THANKS BRIAN!!!!!!!!!!!

    Dale in KC

    Tuesday, April 06, 2010 8:03 PM
  • Brian Borg's method works and works well in Windows 7... and for you old batch file guys, Windows 7 also allows the old DOS batchfile command "choice" works for this batch file and all you have to do to find out how to run "choice" is to open a command prompt and type in "choice /?" and press enter. It will "echo" the the help info to your screen.

    If you want to save the text for this to a text file you can run this: "choice /? > c:\temp\choicehelp.txt". Note that the "/?" is what echos the messages to the screen, but " > c:\temp\choicehelp.txt" send the screen output to a file in c:\temp called choicehelp.txt. NOTE that you should have a folder called C:\temp in existence before you do this command.

    Here is a sample batch file for the "choice" commands. Note that the menu can be numbered to show the user what number to press to get the menu item to run, but the ERRORLEVEL NUMBERS should be in decending order in the commands below the menu... see my example... 4. CANCEL takes you to the first item under the command area. Just look at the help info after you get your text file made for help. You MUST tell it how many and what numbers you want for the menu. CSee the command "choice /c 1234" below. Pressing any of the others 1, 2 or 3 will run the command and take you back to the menu. That is what the ":MENU" is at the top of the batch file.

    @ECHO OFF
    :MENU
    CLS
    ECHO Choose menu item to run:
    ECHO 1. BACKUP OF PICTURES
    ECHO 2. BACKUP OF MUSIC
    ECHO 3. BACKUP OF DOCUMENTS
    ECHO 4. CANCEL
    choice /c 1234 /M "Choose Menu Item to Run:"
    IF ERRORLEVEL 4 GOTO END
    IF ERRORLEVEL 3 GOTO DOCUMENTS
    IF ERRORLEVEL 2 GOTO MUSIC
    IF ERRORLEVEL 1 GOTO PICTURES
    GOTO END

    :DOCUMENTS
    ECHO "BACKUP MY DOCUMENTS?"
    PAUSE
    XCOPY "C:\USERS\DALE\MY DOCUMENTS\*.*" /D/R/S/E/V/Y "D:\USERS\DALE\MY DOCUMENTS\*.*"
    goto MENU

    :MUSIC
    ECHO "BACKUP MY MUSIC?"
    PAUSE
    XCOPY "C:\USERS\DALE\MY MUSIC\*.*" /D/R/S/E/V/Y D:\USERS\DALE\MY MUSIC\*.*"
    goto MENU

    :PICTURES
    ECHO "BACKUP MY PICUTRES?"
    PAUSE
    XCOPY "C:\USERS\DALE\MY PICTURES\*.*" /D/R/S/E/V/Y "D:\USERS\DALE\MY PICTURES\*.*"
    goto MENU

    :END
    ..........................good luck, Dale

    Tuesday, April 06, 2010 10:06 PM
  • I've made a Video tutorial on this very subject which makes it easy for even novice Windows 7 users

    http://www.youtube.com/watch?v=viIoG3q71g0

    Thursday, April 29, 2010 12:47 AM
  • 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 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..

    Wednesday, June 02, 2010 1:59 PM
  • after reading through all these suggestions, i discovered that you CAN in fact drag and drop - simply pin the program icon to the Start Menu first, then drag it to the Quick Launch area - voila!

    keep it simple ;)

    • Proposed as answer by extrasmooth Friday, July 02, 2010 7:11 AM
    Friday, July 02, 2010 7:10 AM
  • Let me make it clearer.
    1. Go to http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html?tag=mncol

    2. Download it. Open the archive you'll see...

    3. Bat_To_Exe_Converter.exe (you can run it while its still in the archive if you like)

    4. On the TOP RIGHT of the Bat_To_Exe_Converter.exe theirs a Browse... button. Click it and locate your .bat file.

    5. (OPTIONAL) Right below that box you should see the output path. Here you can rename your file(you can do this latter and it won't cause a problem).

    6. Press Compile....DONE!

    Now you should have 2 files with the same name with different file extention. ex....
    Mybatch.bat <- Keep in case you want to change latter
    Mybatch.exe <- Create a shortcut to this and pin to Task Bar

    Summary.
    Download Bat_To_Exe_Converter.exe.
    Open it and browse for your .bat file.
    Press Compile.
    Make a shortcut for your new .exe file.

    Got it?


    Hello,

    This really solves cmd pinning problem, but how about when I launch exe file from this converted cmd, I have  two separate taskbar buttons to same program.

    For make it clear I have cmd that copies/updates program to local disk and after that it starts that program. Now I can convert this cmd to exe and pin it but when I launch it I have pinned "converted cmd" and started program exe on my taskbar and I can pin that also. If user pin's this direct program exe and starts using it my update procedure doesn't work anymore. Any toughts?

    Basically my CMD is as simple as this:

    robocopy \\server\share %localappdata%\ProgramFolder

    %localappdata%\ProgramFolder\ProgramName.exe

    Br, Mika

     

    Sunday, August 22, 2010 10:52 AM
  • __Mika__, What if your command line is:

    "robocopy \\server\share %localappdata%\ProgramFolder && %localappdata%\ProgramFolder\ProgramName.exe"

    Sunday, August 22, 2010 7:36 PM
  • Thanks for the reply, but no go.

    It still launches ProgramName.exe as separate process and it show up in the taskbar as it own.

    I think that ProgramName.exe should be launched as child process of "converted cmd" or something?

    Tuesday, August 24, 2010 5:01 PM
  • All, 

    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

     

    Hope this helps you. 

    Sunday, September 19, 2010 5:18 PM
  • You could also create the shortcut to the batchfile on your desktop (alows you to test if it works) and then move it to:

    C:\Users\<username>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar

    • Proposed as answer by Peter Simonis Monday, July 18, 2011 3:29 PM
    Monday, July 18, 2011 3:28 PM
  • Ted:

    Easy fix:

    The final post at the bottom (Peter Simonis) comes close, but if I understand what you want, it is the same functionality as you had before: drag and drop your .bat to the quick-launch and have it run... ?

    Simply restore the "old quick launch":

    Right-click task-bar,  select toolbars, New Toolbar, in the resulting window navigate to:

    C:\Users\<username>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

    select (highlight, don't open) the <Quick Launch> folder, press <Select>.

     

    There you have it. quick-Launch tool-bar is back you can now drag and drop your batch file, click it: it runs...

    You can also, if you prefer, move your batch file there by right-drag-select move...

    Have fun...

    (you may have to unlock the task bar first [right-click,unlock] which will also allow you to move it from the default right side if you so desire)

    - John

     

     



    Saturday, July 30, 2011 6:15 AM
  • 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 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..

    Holy cow! This works perfect!  Duh!
    • Proposed as answer by b.ellis Tuesday, November 01, 2011 2:24 PM
    • Unproposed as answer by b.ellis Tuesday, November 01, 2011 2:24 PM
    Saturday, October 29, 2011 5:59 PM
  • I thought I had the same issue and tried a few things here, only to finally realize that the solution is pretty simple:

    For starters, no, batch/cmd files cannot be added to the taskbar directly by drag and drop or by pinning (this is a bug/shortcoming IMO), but that's the way it is.

    The solutions suggested here of pinning cmd.exe and then revising it are really only getting half way there.  What you're really doing is actually pinning an exe (which could be ANY exe) to the task bar, and then revising it's paramaters. 

    The bad part about doing it with cmd.exe is that the ugly black cmd window icon is the only icon you can ever set for your batch, which stinks.  In my case, I was creating a batch file for eclipse.exe and wanted to use it's icon.  

    I did this not by adding cmd.exe to the taskbar, but instead adding eclipse.exe to the taskbar, and then changing it's parameters to the batch/cmd file.  The beauty of this approach is that you get the icon of the program that you're really running and can see that on your taskbar, rather than an ugly, non-descript cmd window icon.  I've done this now a for a few different batches, and it works great.  Obviously if your batch file is running shell commands that aren't ultimately calling an exe like I am, you would probably want to use the cmd.exe method, because in that case, you really are adding a batch/cmd to your taskbar.  In many cases though, there is ultimately some program you're setting up for when creating batches on the taskbar, and in that case, adding the program that is ultimately run to the taskbar first gets you a nice icon that you can live with (BTW, I also think that the fact that windows lets you change the icon in the properties dialog but never actually uses it is a bug as well, IMO).

    Hope this helps!

    Tuesday, November 01, 2011 2:39 PM
  • The quickest solution I've come up with is to use AutoHotKey with the following:

    Run, [full-path-to-batch-file]
    ExitApp


    Once compiled, you can just drag-and-drop the script onto the taskbar. The nice thing about this is that it's super easy to update with whatever batch files you want to run, and you don't have to perform any 'gymnastics' every time. 

     

    Cheers

    Thursday, December 15, 2011 2:28 AM
  • 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 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..


    Great tip BabuNagarajan, simple, elegant, no downloads necessary!  I incorporated it into a YouTube step-by-step walkthru of Taskbar shortcut creation and icon customization I created here tinkertry.com/skypetwice, where you'll also see I found a way to avoid logoff/reboot for icon customization. Works great, thanks to your comments and other great comments in this extremely helpful thread!




    • Edited by tinkererguy Sunday, January 01, 2012 6:46 PM
    Sunday, January 01, 2012 6:41 PM
  • SPORTS NEWS :

    F. DALE & BRIAN BORG :  10Points

    WON!!!   thx!! ;)

    Tuesday, January 29, 2013 1:30 PM