Windows Mobile Developer Center >
Smart Device Development Forums
>
Windows Marketplace for Mobile
>
PNG icon not visible until soft reset
PNG icon not visible until soft reset
- I'm testing a CAB on the WM 6.5 US emulator. The setup is installing the PNG start menu images via the following line in the INF:
[Reg.Icon]
HKLM,"Security\Shell\StartInfo\Start\MyApp.lnk","Icon",0x00000002,"%CE2%\ImageFile.png"
The PNG does not appear in the start menu until a soft reset. Before that, an icon from the executable is displayed. I've checked - the PNG is present in the Windows folder, and the value is present in the registry. The Windows Mobile installation is fresh from a hard reset - so there can be no interference from side software.
KarenV, I believe, reported the same issue the other day. So, how do I work around that? And will it impede the certification process?
Answers
- Yes indeed, the order matters. From
[DefaultInstall]
CopyFiles = Files.InstallDir,Files.Windows
CEShortcuts = Links
AddReg = Reg.Sync
I went to
[DefaultInstall]
CopyFiles = Files.InstallDir,Files.Windows
AddReg = Reg.Sync
CEShortcuts = Links
and the PNG was there right upon setup. Yay, go me.- Marked As Answer bySeva Alekseyev Sunday, September 13, 2009 9:06 PM
All Replies
It works for me on my 6.5 devices. I do not need to soft reset.
- Do you install the icon via the CAB, or by setup dll?
Maybe the order of commands in the INI matters... - I do not use a setup DLL for any of my products Seva. Hope that helps.
- Yes indeed, the order matters. From
[DefaultInstall]
CopyFiles = Files.InstallDir,Files.Windows
CEShortcuts = Links
AddReg = Reg.Sync
I went to
[DefaultInstall]
CopyFiles = Files.InstallDir,Files.Windows
AddReg = Reg.Sync
CEShortcuts = Links
and the PNG was there right upon setup. Yay, go me.- Marked As Answer bySeva Alekseyev Sunday, September 13, 2009 9:06 PM
- It's funny.
After years and years of creating INF's, setups, etc, all the things that just worked somehow just don't anymore.
Good find Seva. Yes indeed, the order matters. From
[DefaultInstall]
CopyFiles = Files.InstallDir,Files.Windows
CEShortcuts = Links
AddReg = Reg.Sync
I went to
[DefaultInstall]
CopyFiles = Files.InstallDir,Files.Windows
AddReg = Reg.Sync
CEShortcuts = Links
and the PNG was there right upon setup. Yay, go me.
wow.
Can someone from Microsoft explain this please? Why would the order matter?
- Thank you Seva.
- So if the order of "CEShortcuts" and "AddReg" under [DefaultInstall] explains why I've been banging my head against the wall for the last day trying to get my AppIcon.png to appear, the next question is:
Can the order of "CEShortcuts" and "AddReg" be controlled within a deployment project, or do I have to:
1. modify the .inf manually as shown above
2. remember to never automatically build the deployment project again
3. manually run cabwiz.exe as a separate build step - Were not MS but had quite a bit of practice on this one!!
Our understanding is that:
At the point in time you create the application shortcut the Shell caches the application icon.
Because of the extra steps on 6.5 for PNG icons, the PNG icon needs to be set up fully - the PNG registry entry created, icon resolved etc before the Shell caches the icon - i.e. before you create shortcuts.
If PNG not fully setup the Shell will grab the appropriate Apps .ICO - as it cant find any png regisrty info to tell it otherwise.
Soft reset = Shell re-caches its icons. By then the PNG registry entry etc all been setup so it all works/picks up correct icon.
The above makes sense, its just not very obvious what is going on. So yes Installation order matters Regarding the issue of your PNG not being displayed until you do a soft reset, see my blog post here on how to resolve it.
http://blog.mjfnet.com/Blog/2009/11/06/WindowsMobile65StartScreenPNGIconDisplayProblem.aspx
Thanks,
Mike


