Open Bug 679680 Opened 11 years ago Updated 3 years ago

TB icon not on pinned shortcut


(Thunderbird :: OS Integration, defect)

6 Branch
Windows 7
Not set


(Not tracked)


(Reporter: u422471, Unassigned)



(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0
Build ID: 20110811165603

Steps to reproduce:

Update from Thunderbird 5 to Thunderbird 6 on Windows 7 Professional 64bit

Actual results:

When started with a pinned shortcut in the taskbar, TB 6 appears as a new icon in the taskbar

Expected results:

When started with a pinned shortcut in the taskbar, TB 6 should appears on the pinned icon in the taskbar
More informations:

This is fixed when removing the pinned shortcut and pin it again to the tastkbar. But after updating Thunderbird from 6.0 to 6.0.1 or 6.0.1 to 6.0.2 this problem is back.
Hmm, we have code to handle precisely this (bug 661363), so this shouldn't be happening. Looking into it.
I can't reproduce this locally. Here's what I did:

1. Set up a fresh Windows 7 x64 SP1 virtual machine and make sure that it's up-to-date.
2. Download Thunderbird 5: <>.
3. Install Thunderbird 5 using default settings.
4. Open Thunderbird and pin it to the taskbar, then go to help -> about and update to Thunderbird 6.0.2.

No new icon showed up for me.

Could you try the following steps, please? Since you mentioned Thunderbird 6.0.1 as having the same issue, let's start from there.

1. Unpin any Thunderbird shortcuts you already have in the start menu or taskbar.
2. Uninstall Thunderbird.
3. Download Thunderbird 6.0.1: <>.
4. Install it as usual.
5. Open it up, then pin it to the taskbar.
6. Help -> About and update to 6.0.2.

Does the problem still show up? If it does, then

7. Open a command prompt (cmd).
8. Type in the following commands:

cd "%appdata%\roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
copy Thunderbird.lnk Thunderbird.lnk2

9. Now add Thunderbird.lnk2 as an attachment to this bug. In the file selection box, you should be able to navigate to %appdata%\roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar. The reason you can't attach Thunderbird.lnk directly is that Windows thinks you want to attach the target of the link (the actual Thunderbird executable).
> cd "%appdata%\roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"

My mistake. This should be

cd "%appdata%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
Attached file Thunderbird.lnk2

Thanks for your reply.

I did some tests as you wrote above. The same happens again and again when i deinstall Thunderbird, install TB 6.0.1 and update it to 6.0.2. But i found some strange behavior with the name of the .lnk files:

When i install TB 6.0.1 and pin it to the taskbar the .lnk file is named "Mozilla Thunderbird.lnk". When i update from 6.0.1 to 6.0.2, remove the pinned shortcut and pin it again the Link is called "Thunderbird.lnk"

I've attached both shortcuts as an attachment.
Attachment #558800 - Attachment mime type: text/plain → application/octet-stream
Attachment #558802 - Attachment mime type: text/plain → application/octet-stream
This is really strange, the shortcuts don't seem to have any sort of app model ID set at all. In the config editor, what is mail.taskbar.lastgroupid set to?

Thanks again for your reply.

The mail.taskbar.lasgroupid with TB 6.0.2 is now set to:

Hi, Chris, are you still having this issue with Thunderbird 7.0.1? Nothing's changed on our end, but I'm still curious. If you are then I think I'll look into this issue a bit further.
Hey, thanks for asking about the status of my problem. I'm still having this issue and did some more tests:

The strange thing was, i had a Thunderbird 3.1.6 and a Thunderbird 7.0.1 in the list of my installed software in the control panel. When i remove one of them, the other one is removed too. Now i've installed Thunderbird 7.0 and this this version appears in the list of my installed software. When i update Thunderbird to 7.0.1 the version 7.0 is still in the list and a new item with Thunderbird 7.0.1 is created. Maybe this causes the problem?
Interesting, that could easily be related. I'm looking at this right now.
I think I've finally managed to reproduce this!

1. Unpin any Thunderbird shortcuts from the taskbar.
2. Right click on the exe in Explorer and choose Pin to Taskbar. <-- This method is important.
3. Open Thunderbird.
No, false alarm :( I still can't reproduce.
Chris, could you try this out? Unpin any Thunderbird shortcuts, install Thunderbird 7.0, pin it, then update to 7.0.1. At this point, you'll be seeing two Thunderbird icons on the taskbar. Now open a command prompt and run

D:\Programme\Mozilla Thunderbird\uninstall\helper.exe /UpdateShortcutAppUserModelIds

This is what we should be running every time there's an update.

ccing Robert -- do you have any ideas what might be happening here? Is the Windows app model ID cache (if it exists) screwed up somehow? The code's all in toolkit/ so it might affect Firefox too.
> D:\Programme\Mozilla Thunderbird\uninstall\helper.exe /UpdateShortcutAppUserModelIds

Sorry, this should be

"D:\Programme\Mozilla Thunderbird\uninstall\helper.exe" /UpdateShortcutAppUserModelIds

Sorry, i wasn't online to answer your questions. I've tested this and run "D:\Programme\Mozilla Thunderbird\uninstall\helper.exe" /UpdateShortcutAppUserModelIds in my command prompt after the update from 7.0 to 7.0.1. After running the command i got no output / results and there are still two icons on the taskbar.
There have been a couple of reports of this happening with Firefox as well though I have no idea as to why it happens for some people. I *think* bug 577867 will at least make this happen even less often since the app id on the shortcut won't need to be updated.
So through an awesome live debugging session with Chris (thanks Chris!) we found out that the helper.exe process had its compatibility set to Windows Vista. (I think it was because of bug 670034). Removing the setting made everything work again.

Some ways to resolve the issue:
1. Remove the ${If} ${AtLeastWin7} condition at <>. There are probably plenty of other bugs of this sort lurking around though.
2. If we find a registry entry for ourselves under (HKCU|HKLM)\Software\Windows NT\Current Version\AppCompatFlags\Layers, remove it (might need to elevate here), then reload ourselves.

Robert, Jim, thoughts?
Ever confirmed: true
I don't think that this was caused by bug 670034 since that will not set AppCompatFlags, we have had one bug report for this with Firefox using NSIS 2.33, and I have tested this numerous times on Win7 using NSIS 2.46 without this happening. I have seen bug reports of AppCompatFlags getting set by something other than Firefox or Firefox's separate binaries (a couple of times where the user set the AppCompatFlags on firefox.exe for example) which I suspect is the cause in this instance.

Bug 577867 will remove the need to update the app id on shortcuts which should solve this problem since the following won't be necessary any more.

I wouldn't be against the removal of the registry key though it shouldn't really be necessary and the removal would only apply to the next time the binary was launched.
You need to log in before you can comment on or make changes to this bug.