Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows shortcut not displaying correctly in taskbar until reboot

Tags:

taskbar

lnk

When my MSI package upgrade installation is completed, all shortcuts immediately work as expected, except that the label in the taskbar refers to the binary being executed, rather than giving the shortcut link (and icon). After a reboot, the link works correctly.

More specifically: in the context menu of the icon in the task bar, the toplevel entry (i.e. the program name) displays as "pythonw.exe". After the reboot, it (correctly) displays as "IDLE (Python GUI)". It appears as if Windows somehow cannot remember that it launched the program from a shortcut, until the system is rebooted. (see bug report)

As a consequence, the incorrect icon is displayed, and users cannot pin the icon to the taskbar (rather, pinning would pin the executable, not the shortcut).

What is causing this problem? Is there something in my installer I could do to fix it? I'd rather avoid having users reboot the system, since everything else works fine without a reboot.

like image 536
Martin v. Löwis Avatar asked May 30 '13 18:05

Martin v. Löwis


People also ask

How do I fix a shortcut on my taskbar?

It may be possible that the shortcut was somehow corrupted. Follow to re-pin File Explorer: On your taskbar, right-click on File Explorer and then select Unpin from taskbar. Press Windows key + E on your keyboard and then right-click on the File Explorer icon then select Pin to taskbar.


1 Answers

"1. Press Ctrl-Shift-Escape to get the task manager.

  1. In the Processes tab, click on explorer.exe and click End Process. You'll get a confirmation dialog. Click "End Process" to confirm.

  2. From the File menu (still in the task manager), choose New Task (Run...).

  3. Copy/paste/enter the following command in the run box: Code: cmd /c del %userprofile%\AppData\Local\IconCache.db /a

  4. Open the Run box again with File --> New Task (Run...). This time, enter this command: Code: explorer.exe

  5. All should be okay now. Open the Start Menu and confirm that your icons are fixed now."

This fixes such issues, my guess would be your installer is perhaps corrupting something in the iconcache.db, is it possible then I wonder to have your installer rebuild the icon cache after installing? Kind of a hack but it's the best I can come up with

like image 101
Alec. Avatar answered Oct 16 '22 10:10

Alec.