Ask a questionAsk a question
 

AnswerPNG icon not visible until soft reset

  • Sunday, September 13, 2009 8:47 PMSeva Alekseyev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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

  • Sunday, September 13, 2009 9:06 PMSeva Alekseyev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    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.

All Replies

  • Sunday, September 13, 2009 8:49 PMmastersdom Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    It works for me on my 6.5 devices. I do not need to soft reset.

  • Sunday, September 13, 2009 8:58 PMSeva Alekseyev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Do you install the icon via the CAB, or by setup dll?

    Maybe the order of commands in the INI matters...
  • Sunday, September 13, 2009 8:59 PMmastersdom Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I do not use a setup DLL for any of my products Seva. Hope that helps.

  • Sunday, September 13, 2009 9:06 PMSeva Alekseyev Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    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.
  • Sunday, September 13, 2009 9:18 PMKarenV Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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.

  • Monday, September 14, 2009 11:34 AMsedwo2 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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?

  • Monday, September 14, 2009 12:15 PMJohnLim Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank you Seva.
  • Wednesday, October 14, 2009 2:56 AMjaybo_nomad Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Wednesday, October 14, 2009 7:53 AMbbjbbj Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    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
  • Friday, November 06, 2009 7:38 PMM FrancisMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    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