none
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.

    Thanks.
    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
              Shell=“cmd.exe”

     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.

    Thanks.
    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) ?


    Thanks!
    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

    www.sjjmicro.com / www.seanliming.com, Book Author - XP Embedded Advanced, XPe Supplemental Toolkit, WEPOS / POS for .NET Step-by-Step
    Sunday, February 14, 2010 5:50 AM
    Moderator
  • 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]

    Shell=“eShell.exe”

    The eShell.exe gets its parameters from this key.

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

     

    Shell

    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.

     

    CustomReturnCodeAction

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

     

    AllOtherReturnCodeAction

    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:

    Value

    Description

    0

    Restart the custom shell.

    1

    Restart the device.

    2

    Turn off the device.

    3

    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.

     

    http://technet.microsoft.com/en-us/library/hh300749(WinEmbedded.21).aspx

     


    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


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - ProGuide to WES 7, XP Embedded Advanced, WEPOS / POS for .NET Step-by-Step
    Monday, July 11, 2011 8:03 PM
    Moderator