none
Is it OK to Overwrite registry launch50="explorer.exe" in EC7 to point to my own APP ? RRS feed

  • Question

  • So, normally we use Kiosk Windows ce images to prevent access to windows innards through the User interface and then we launch our app via some high Init launch number e.g. Launch90. But because of my new EC7 BSP's shortcomings I need an easy hook into the file system for manufacturing purposes to copy files into the box, etc. In other words I need Explorer.exe to setup the device.

    Including the "Standard shell" catalog item seemed to be the easiest way to bring in Explorer.exe with all its dependencies.

    So I included the "Standard Shell" catalog item, and then I overwrote the following REG key as follows:

    [HKEY_LOCAL_MACHINE\init]
            "Launch50"="MyOwnManagedApp.exe"
            "Depend50"=hex:14,00, 1e,00

    "MyOwnManagedApp.exe" is nothing more than a "hello world" .net Windows Forms App that being top-most window just hogs the screen, but can perhaps on-demand launch explorer if needed. For normal operation and all practical purposes, explorer.exe will never be invoked.

    This all appears to work great, but ...

    First question:

    Is there anything fundamentally wrong with doing this?

    Am I stomping on anything?

    Second question:

    I noticed in "shell.reg" (included in my build which sets up the standard shell) the following key which worries me a bit and I have no clue what it is trying to do:

    ; -- Set memory thresholds for Hibernate
    ;

    [HKEY_LOCAL_MACHINE\SYSTEM\Hibernate]
            "Bytes"=dword:20000
            "Pages"=dword:28

    I do not ever want my box to enter hibernation.

    Thanks in advance for your help.

    Tuesday, August 23, 2016 7:52 PM

Answers

  • There is no problem with your approach, other than that at the time the Launch key is processed not all APIs for your application may be ready in case your application is developed in managed code. If it is native code, then there is absolutely no problem.

    Explorer.exe does implement some shell related functionality that you could implement in your application if you need it (like notifications for taskbar icons, for instance to show the Ethernet connection status). If you just want to run your application you most likely don't have to do anything else. If you ever need the shell, you can of course just start explorer.exe using CreateProcess.

    The hibernate registry key is only used in the shell to free up memory for other applications if memory runs low. For instance the shell itself will clear the icon cache to free up memory. It is not "hibernate" in the sense that you think it is. See the code in \WINCE700\public\shell\oak\hpc\explorer for more info.



    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    • Proposed as answer by Bruce EitmanModerator Wednesday, August 24, 2016 1:58 PM
    • Marked as answer by _3AM Thursday, August 25, 2016 12:29 AM
    • Unmarked as answer by _3AM Thursday, August 25, 2016 12:30 AM
    • Marked as answer by _3AM Thursday, August 25, 2016 12:30 AM
    Tuesday, August 23, 2016 10:20 PM
    Moderator

All replies

  • There is no problem with your approach, other than that at the time the Launch key is processed not all APIs for your application may be ready in case your application is developed in managed code. If it is native code, then there is absolutely no problem.

    Explorer.exe does implement some shell related functionality that you could implement in your application if you need it (like notifications for taskbar icons, for instance to show the Ethernet connection status). If you just want to run your application you most likely don't have to do anything else. If you ever need the shell, you can of course just start explorer.exe using CreateProcess.

    The hibernate registry key is only used in the shell to free up memory for other applications if memory runs low. For instance the shell itself will clear the icon cache to free up memory. It is not "hibernate" in the sense that you think it is. See the code in \WINCE700\public\shell\oak\hpc\explorer for more info.



    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    • Proposed as answer by Bruce EitmanModerator Wednesday, August 24, 2016 1:58 PM
    • Marked as answer by _3AM Thursday, August 25, 2016 12:29 AM
    • Unmarked as answer by _3AM Thursday, August 25, 2016 12:30 AM
    • Marked as answer by _3AM Thursday, August 25, 2016 12:30 AM
    Tuesday, August 23, 2016 10:20 PM
    Moderator
  • Thanks for you reply Mike,

    I would like to think that none of the entries in the shell.reg file (including that hibernate key)  have any effect unless Explorer.exe is running. Is this correct?

    Wednesday, August 24, 2016 12:00 PM
  • Who is Mike?

    Probably nothing in shell.reg would be used, but it is up to you to test your device both without and with Explorer.exe running.  I say with only because you say that you might start it from your app.

    Another thing to think about is that your app should call SignalStarted() if it starts from the Init registry key.



    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman
    I work for Eurotech

    Wednesday, August 24, 2016 2:04 PM
    Moderator
  • Thanks Bruce,

    I shortened Michel to Mike by mistake. Ooops ! My bad, and apologies to Michel !

    I am not seeing anything bad in the testing w/ or w/o explorer.exe running. 

    But my understanding is that Explorer.exe is the shell and if I never get that running on a normal boot sequence, and I never run it thereafter either, then I don't have to worry about the "shell.reg" entries  having any effect. Is this correct?

    Wednesday, August 24, 2016 2:58 PM
  • Correct.

    And you can call me Michel, Michael or Mike, all good! ;-)


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    • Marked as answer by _3AM Thursday, August 25, 2016 12:30 AM
    • Unmarked as answer by _3AM Thursday, August 25, 2016 12:30 AM
    Wednesday, August 24, 2016 10:45 PM
    Moderator