I use some programs with command line arguments and like to have shortcuts for launching those programs with those arguments. For example, I keep several Firefox profiles around and like to specify the profile name on the command line. Similarly I have several Eclipse shortcuts with a command line argument specifying the workspace to open.

I would like to be able to pin these shortcuts to the start menu or taskbar in Windows 7. The problem I have is that once I've pinned one of these, no other shortcuts which launch the same exe can be launched.

I'm also open to suggestions such as a suitable desktop gadget which can contain a bunch of arbitrary shortcuts, yet remain in a fixed position on my desktop somewhere, or some way of adding a secondary taskbar (this was possible in XP).

link|improve this question
This is a great question for the Windows development team. I'm sure that out of the box, there is probably no way to do this, but I think this should go on the "must-have-feature-list" for future versions of windows. – Zeke Hansell Mar 9 '11 at 16:02
Another variation of this question is using an administration shortcut. For example, I want to keep shortcuts pinned for a normal command-prompt and an administrative command-prompt. However only one can be pinned. – Synetech Mar 9 '11 at 19:02
feedback

5 Answers

You can't pin batch files and shortcuts to Windows 7's task bar directly. Here's an easy workaround that may suffice:

  1. Make a folder someplace.
  2. Create batch files to launch your programs with the specific command-line arguments you want for each, and stick them in that folder.
  3. Right-click a blank area on the Windows task bar --> Toolbars --> New Toolbar
  4. When the "choose a folder" dialog opens, locate and select the folder you created.
  5. Use the task bar options (Unlock, Show Title, Show Text, etc.) to adjust the icon(s) appearance to your liking.

You're not going to get all the nice Windows 7 stuff like previews and such, but I'm not sure you care about that. ;)

EDIT: Here's a gadget that may fit your bill: http://rocketdock.com/

Hope that helps...

link|improve this answer
This is a good suggestion but unfortunately for me it clutters the taskbar too much (I miss XP's multiple-taskbar feature). – Mr. Shiny and New 安宇 Mar 9 '11 at 18:37
I'm not really sure how that clutters the bar any more than a bunch of pinned icons, but hey. ;) Yes, it's annoying you can't undock them; added a gadget link for you, hope it helps... – techie007 Mar 9 '11 at 18:46
It clutters the bar mainly because in XP I actually had two task bars, one at the top of the screen and one on the far right edge, and the right-hand one had all my shortcuts. In 7 you can only have one taskbar. – Mr. Shiny and New 安宇 Mar 10 '11 at 2:11
feedback

I've encountered this problem recently and came up with the following solution (I'll assume a default Firefox installation when providing the example):

SETUP

Firefox executable (C:\Program Files\Mozilla Firefox\firefox.exe)

Some profiles:

  • Personal
  • Work
  • Development

SOLUTION

We'll use the MKLINK utility which ships with the OS.

Since you can only pin an application once to the taskbar, we have to make Windows believe you have several Firefox executables. We'll do this by creating a few 'hard links' to firefox.exe.

  1. Open a Command Prompt (cmd.exe)
  2. Navigate to the Firefox install directory cd "C:\Program Files\Mozilla Firefox\"
  3. Create 3 hard links for the three profiles:
    • Personal: mklink /H firefox_Personal.exe firefox.exe
    • Work: mklink /H firefox_Work.exe firefox.exe
    • Development: mklink /H firefox_Development.exe firefox.exe
  4. Create the shortcuts for the copies we've just made (Right Click > Create shortcut)
  5. Edit the shortcuts (Target field):
    • firefox_Personal.exe.lnk: "C:\Program Files\Mozilla Firefox\firefox_Personal.exe" -P "Personal" -no-remote
    • firefox_Work.exe.lnk: "C:\Program Files\Mozilla Firefox\firefox_Work.exe" -P "Work" -no-remote
    • firefox_Development.exe.lnk: "C:\Program Files\Mozilla Firefox\firefox_Development.exe" -P "Development" -no-remote
  6. Drag the 3 shortcuts to the taskbar (pin them). You can delete the original shortcuts.
  7. Change the name and icon of the pinned shortcuts, and you're good to go.

If something is not clear please let me know, and I'll try to make a screencast.

Firefox command line options

link|improve this answer
That definitely sounded promising. Didn't work for Chrome, though. As soon as I launched the second shortcut it got grouped again with the first one... :( – Oliver Giesen Aug 11 '11 at 22:40
WTF! It doesn't even work when I create an actual copy of chrome.exe ... – Oliver Giesen Aug 11 '11 at 22:45
feedback

Say you want a second copy of chrome on your taskbar (select folder properties to show extensions of files)

  • Create an empty file somewhere and call it "chrome1.exe"
  • Drag & pin it to taskbar
  • Rename the file to "chrome1.bat"
  • Shift+Right-click the taskbar icon & select properties
  • Change the target to ".bat" from ".exe" (since you renamed your file)
  • Edit chrome1.bat & add start <path to chrome app>\chrome.exe
  • Change the icon if needed
link|improve this answer
feedback

You can add any application file or shortcut to one original pin, to access them simply right click the application instead of left click.

link|improve this answer
feedback

You can simply copy the Eclipse application at the same location, and then pin that new copy of Eclipse to the Start menu. You can make that point to a different workspace.

You can repeat this as often as required.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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