Pin same app multiple times in Windows 7

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


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 from Mozilla

Firefox command line options from Mozillazine


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.


In case anyone stumbles upon this, it's actually really simple to setup Firefox profiles to group into separate taskbar pins like the Chrome profile manager works.

I like to have a separate "personal" and "work" Firefox profile with separate shortcuts pinned side by side:

• Launch Firefox and go to about:config.

• Add New > Boolean > "taskbar.grouping.useprofile" > true.

• Next, close and relaunch a new instance of Firefox using RUN > "firefox.exe -P [profile] -no-remote"

• Pin this app icon to the taskbar.

• Now, navigate to C:\Users[profile]\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar.

• Edit properties on the now pinned shortcut to include the same "-P [profile] -no-remote" in the target.

Repeat this procedure for every profile you would like to pin separately to your taskbar and each profile will have its own grouping accordingly.