How to custom shell RRS feed

  • Question

  • I have a custom application and I want to start it immediatelly after booting. In wes2009, I disable the default shell and run my application by "RunOnce". But I can't find useful introduction about "custom shell" in wes2011 help document. So, how to do it in WES2011.

    Monday, October 12, 2009 8:30 AM

All replies

  • The shell that gets launched is determined by the registry value:

         HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

     You can change this value to launch the your custom shell.  

    If you choose the "Command Prompt Shell with Custom Shell Support" it will process the RunOnce keys for you without having to have the standard Windows Explorer Shell.

    -Preston V
    Monday, October 12, 2009 5:21 PM
  • Hi,

    The Windows Embedded Standard 2011 documentation is not yet complete.

    If you select the Package "Command Prompt Shell with Custom Shell Support", the registry key HKLM\Software\Microsoft\Windows Embedded\EEF\Shell Launcher\Shell is set to CMD.EXE /k CMD.EXE (to launch two instances of the command shell).  You can change this value to the name of your application, and this will set your application as the shell.

    Thank You

    Tony Ting, Microsoft
    • Proposed as answer by Tony Ting, MS Thursday, October 15, 2009 4:54 PM
    Thursday, October 15, 2009 4:54 PM
  • Hi Preston, Tony,

    I have added "Command Prompt Shell with Custom Shell Support" Package as you said. And I also added my application A.EXE to ..\DS\$OEM%FOLDERS\MY\$OME$\MYAPP\A.EXE. Where is my application going to be deployed in my target system. If I hope the path of my application is "C:\MYAPP", how to get it. I think I can't change "CMD.EXE /k CMD.EXE " to "A.EXE" simply, there must be some other arguments such as my application path and "start" and so on. I'm not sure, can you describe it clearly.

    Tuesday, October 20, 2009 2:17 AM
  • Hi all.

    This is my question:
    If I set my own application as shell, I will benefit from the stability advantages like the default shell explorer.exe?
    For example, if explorer.exe crashes while I'm doing something, it restarts by itself in a couple of seconds.

    This is an automatic
    behaviour for every program set as shell or I have to do something else (for example, use a watchdog) ?

    Friday, February 12, 2010 3:08 PM
  • In theory if you use Eshell.exe to launch the application, Eshell should re-launch the application if it goes crashes or goes down.

    -Sean /, Book Author - XP Embedded Advanced, XPe Supplemental Toolkit, WEPOS / POS for .NET Step-by-Step
    Sunday, February 14, 2010 5:50 AM
  • Thank you Sean, but pratically... I can't find any information about eshell.exe (I googled and binged a lot but I found only something about WMC and eh shell.exe, but I don't know how to find or use that).

    I'm trying to use the watchdog solution: a program that constantly monitor the running applications. It the shell crashes will be restarted; it works but requires too much resources.

    Anyone as a better solution?

    Wednesday, February 17, 2010 2:38 PM
  • The "Command Prompt Shell with Custom Shell Support" package provides the restarting functionality for whatever exe you set as the shell.

    -Preston V
    Wednesday, February 17, 2010 8:13 PM
  • OK, this is info I have collected with lots of pan staking Research and is no Account complete as the Documents for EShell.exe are not complete:

    If you build your OS using ICE (Windows Embedded 7 Answer file) you can add the “Custom Shell Support”.  It will set the Win Logon Shell value.

    [HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]


    The eShell.exe gets its parameters from this key.

    [HKLM\Software\Microsoft\Windows Embedded\EEF\Shell Launcher]



    You put the File Path of your custom shell. If your custom shell is in a folder included in the %PATH% environment variable, you have the option of just typing the name of your custom shell. Otherwise, you must type the full path of your custom shell.



    Configure the value for Action under CustomReturnCodeAction to define the behavior when a specific return code is encountered.



    Configure the value for Action under AllOtherReturnCodeAction to define the behavior when any other return code is encountered


    Set the registry value for Action to configure the desired behavior:




    Restart the custom shell.


    Restart the device.


    Turn off the device.


    No action.


    I have tried this using a C# Forms application.  Setting my application Path and File name in the ‘Shell’ parameter, And in fact returning any value from my shell will restart my shell.  So there is documentation missing on How to use the ‘CustomReturnCodeAction’ and the ‘AllOtherReturnCodeAction’ parameters or it is just plain Brocken.  To get a response from the Author would result in Paying for engineering time for the Author.  As I have seen so many questions about writing Custom Shells and how to use the new eShell.exe I would think the Author would rectify the Situation.



    GDW Engineering
    Monday, July 11, 2011 4:02 PM
  • Who are you refering to when you say Author? I am going to assume Microsoft, correct?

    -Sean / /, Book Author - ProGuide to WES 7, XP Embedded Advanced, WEPOS / POS for .NET Step-by-Step
    Monday, July 11, 2011 8:03 PM