Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In windows 7, if i 'pin' application to taskbar and start it, application window will be associated with taskbar icon (icon will glow, clicking on icon will focus application window etc). As a programmer, i ave full access to application taskbar icon via API - i can make funny effects on download, manipulate context menu etc. But how windows tracks what application icon is associated with? Icon in taskbar is a .link file in a hidden folder, can be checked by shift+right click and selecting 'copy as path'. And if i shift+right click icon in taskbar, select 'properties' and change 'Target', clicking on such modified icon will lauch application i has specified as 'Target'. BUT - such application will have separate taskbar icon! And if, for example, i pin 'notepad', change 'Target' to 'wordpad' and start notepad via 'run', modified icon will be still associated with noteap! And wordpad will start having separate taskbar icon. Where windows keep such associations? Is it possible to modify them?


It seems that i set a wrong experiment. The problem is only with non-exe files (.bat, .py etc), changing target to executable will effectively re-associate it with icon O_O.

share|improve this question
up vote 1 down vote accepted

I can't repeat the behaviour you describe on my system.
When I pin a notepad to the taskbar, then change the target of that icon to wordpad, then that particular icon is not associated anymore with notepad. As in, when I open notepad (via start - run) it has its own new icon on the taskbar. When I open wordpad, it is still associated with the first notepad icon from which I changed the target.

So I think the mapping is done by the target of the icon. If an application is started, it gets added on the taskbar to the icon with the same target. And you can modify that target through the properties of the icon, like you describe yourself.

share|improve this answer

Your Answer


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.