Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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).

share|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

9 Answers 9

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

share|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
    
This works great for the Windows 7 Start Menu shortcuts, but if you pin them to the Taskbar, they'll get merged. Thanks. –  jordanbtucker Jul 10 '12 at 19:57
1  
Symlinking alone didn't do the trick for me, as firefox seems to use a registry setting to store its AppID dependent on the executable's directory. The corresponding setting can be found wihtin the windows registry, located under: HKCU\Software\Mozilla\Firefox\TaskbarIDs Add a new string value for your symlinked path there and give it a value different from the default one (which otherwise seems to get used on the second run). That did the trick for me. –  scipio_jr Jan 19 at 13:37
    
There are some details in this answer regarding how programmers can override the default grouping behavior of the Windows 7 Taskbar, which can be used to break certain windows away from a Taskbar group, or to force a set of windows to combine into one Taskbar group. This could explain why Firefox and Chrome are combining to one Taskbar group, regardless of the hard-linked executable name. –  Oran D. Lord Feb 26 at 18:27

I used the solution provided by "hegearon" with MKLINK but using a folder link instead of file link.

For Firefox, I made a new folder named "Mozilla Firefox Dev" that is a link to the real Firefox folder by using this command :

mklink /D "Mozilla Firefox Dev" "Mozilla Firefox"

Then creating a shortcut to firefox.exe (make sure "start in" properties is pointing the new link directory) and pin it to the task bar.

The solution with the linked file doesn't work for me because windows knows that it is the same process (i discovered it via task manager/process explorer).

With this solution Windows believe that there are 2 distinct Firefox processes because their path are not the same.

Hope it helps.

share|improve this answer

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...

share|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... –  Ƭᴇcʜιᴇ007 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

Don't pin the EXE nor the "official" shortcut: make a shortcut for each profile and then pin them.

1.- Create your own shorcuts in your documents or in your desktop, one for each profile. I did it in "Dropbox\Profiles":

"File" -> "New" -> "Shortcut" -> type the full path

C:\Users\t130688\AppData\Local\MapleStudio\ChromePlus\Application\chrome.exe --user-data-dir="D:\Navegadores\t130688"

Enter and type a distintive name, p.e. "Cool t130688"

2.- Right clic in each shortcut and in "Pin to taskbar"

share|improve this answer

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
share|improve this answer

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

share|improve this answer
2  
How can you do this? I wasn't possible to add a firefox profile shortcut to the already existing firefox pin. –  stefan.at.wpf Jun 9 '12 at 11:38

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.

share|improve this answer
1  
Are you referring to making a copy of the .exe with a different filename? Some apps require specific executable filenames for security reasons so this may not work for all applications. –  Mufasa Nov 8 '12 at 20:03

Let us assume we need to pin 2 shortcuts to the Start Menu (doesn't work with Taskbar!):

  • "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -p User1
  • "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -no-remote -p User2

The easiest way is:

  1. Pin some unrelated application (say, C:\Program Files (x86)\Mozilla Firefox\crashreporter.exe because it's nearby).
  2. Pin the application needed, i.e. C:\Program Files (x86)\Mozilla Firefox\firefox.exe. Now you can edit this shortcut adding necessary arguments.
  3. Edit the first pin replacing crashreporter with firefox and adding arguments needed.
  4. You can also wish to rename shortcuts like Firefox (User1) and Firefox (User2).

This method doesn't work with the Taskbar, as I mentioned before. In this case, use one of the workarounds suggested by other users.

share|improve this answer

After searching for hours, and trying everything, I figured out how to get two profiles running off different icons in the taskbar (ie. different icons and so that they don't combine).

This is all in Win7, and make sure you are careful to use the quote marks I've used in the 'type this' lines. They make a difference. Type everything in bold exactly as is.

Firstly, create a new firefox profile. Go to Start Menu Run and type: Firefox.exe -profilemanager

Create new profile called Mail for use with mail clients etc (or whatever you want to use it for).

Open cmd prompt as Administrator (In Run type cmd then right click CMD and open as admin)

Type this then hit enter:
mklink /H "C:\Program Files (x86)\Mozilla Firefox\fmail.exe" "C:\Program Files (x86)\Mozilla Firefox\Firefox.exe"

Type this then hit enter:
mklink /D "C:\ProgramData\Mozilla Firefox" "C:\Program Files (x86)\Mozilla Firefox"

Create a new link by right clicking anywhere on desktop and choose New->Shortcut

Type in Target: "C:\ProgramData\Mozilla Firefox\fmail.exe" -p Mail -no-remote

Type in Start In: "C:\ProgramData\Mozilla Firefox"

Now click Apply then Ok.

Right click it, then Properties.

Change Icon to Standard Windows Mail icon (just select any random file, and if it doesnt find one, the default ones will come up. The Mail icon is on the top about halfway along)

Click Ok - Apply - Ok

Move this shortcut to the taskbar by dragging it onto it.

You should now have a mail icon in the taskbar.

Right click it, then right click fmail.exe then Properties

Change icon to the same Mail icon you just used previously.

Click ok - apply - ok.

Go to Start Menu Run and type: %localappdata%

Delete IconCache.db in the folder that pops up

Go back to black and white cmd window

Type & hit enter: taskkill /f /im explorer.exe

Type & hit enter: explorer.exe

Now right click the firefox icon in the taskbar and right click firefox.exe then properties

Type in Target: "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P default -no-remote

Click OK

Now you can open two profiles simultaneously, with different icons on the taskbar!!

Open the Mail icon, then CHANGE THE APPEARANCE/THEME under add-ons so you instantly recognise which one you're in by choosing a very different theme to your main browsing profile.

Don't forget to add the usual minimum add-ons (BetterPrivacy, Redirect Remover, Adblock Edge, Self-Destructing Cookies) to the new profile as it is a completely blank profile.

PS> If you are still having issues with icons combining on the taskbar, Run -> regedit, and find "HKEY_CURRENT_USER\Software\Mozilla\Firefox\TaskBarIDs" Then create a new string key called "C:\ProgramData\Mozilla Firefox" and use the same data variable as in the standard one that's there, but change the very last character to anything else. This will stop the icons on the taskbar combining.

PPS> If you're still having issues, make sure you type in EXACTLY what I did above in bold INCLUDING THE QUOTE MARKS!!!!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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