Launch4j, NSIS, and duplicate pinned Windows 7 taskbar icons

荒凉一梦 提交于 2019-11-29 07:58:07

Open the .lnk in a hex editor, the AppModelUserId should be stored as a unicode string about 15 bytes after 28 4C 9F 79 9F 39 4B A8 D0 E1 D4 2D E1 D5 F3

Unless my (internal) LNK dumper is wrong, WinShell::SetLnkAUMI works correctly and the problem is probably not with the shortcut, but just to be sure, you should start your app normally and pin it to the taskbar and then compare the pinned .lnk (%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar) with the shortcut created by NSIS in a hex editor (They might not be 100% equal but you should be able to see your AppModelUserId as a UTF16LE string in both)



eee

This library claims that it can correctly pin Java application to the Windows 7 taskbar with the right icon and name...

http://www.strixcode.com/j7goodies/

See Microsoft explanation:

http://blogs.technet.com/b/deploymentguys/archive/2009/04/08/pin-items-to-the-start-menu-or-windows-7-taskbar-via-script.aspx

Solution in SO: Using JNA to get/set application identifier

Edited:

It seems that InnoSetup has provided support for Windows 7 Jump List since version 5.3.5 by using AppUserModelID parameter for an entry under [Icons] section...it is really a life-saver to this annoying issue...

The following code is still needed to tell Windows 7 that this application process shares the same AppUserModelID as the Windows-7 compatible shortcut created by InnoSetup

//name: must match AppUserModelID name set in an entry under [Icons] section
shell32.SetCurrentProcessExplicitAppUserModelID(name);

With this InnoSetup feature, it will automatically allow pinning and grouping when it detects the same AppUserModelID name.

see http://copyandpastecode.blogspot.com/2010/07/windows-7-jump-list-not-appearing-on.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!