简体   繁体   中英

Windows 7 pinned taskbar icon changes to default file icon when application is upgraded

I have an application I've written for Windows 7/8 which relies heavily on the new taskbar features - jumplists, taskbar overlays, thumbnail previews, etc. Users are instructed to pin the application to get the most out of it.

Every now and then I release an update for this application and during the upgrade process, when the old EXE is removed and the new one installed, the pinned application will lose its icon -- it becomes the default generic file icon.

From what I can tell, it's a simple icon caching problem, and rebooting the machine or restarting explorer will bring the icon back.

I can have my installer ask the user to reboot the machine after each upgrade, but ideally I'd like to find a way to avoid the icon being lost in the first place. The most brutal approach which would definitely work would be to terminate explorer.exe, but that's not ideal either.

I'm using InstallShield LE for the installer, so a lot of the "hard work" is done for me, but this also limit my options. I know I can execute scripts/programs at certain points during the install though.

How can I avoid the icon being lost, or otherwise programatically force windows 7 to refresh the pinned taskbar icons?

决定在每次更新后重新启动。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM