none
Invoke Shell checking RunOnce registry key RRS feed

  • Question

  • Hi,

    I am working on a device with Windows Embedded Standard 7 installed. It has custom shell with command prompt support, eshell.exe. On an OS boot-up the system needs to check if any pending installation is there from the last login. If so, it should start the installation and launch the explorer shell. Otherwise it can launch the eshell.exe. 

    RunOnce registry key of local machine and current user shall be checked for pending keys. If any pending installation is there from last login, it is supposed to be updated here. But this key shall be deleted upon execution of the command successfully! Upon completion of all the commands in the RunOnce keys shell should be launched. If installation is in progress explorer shall be invoked. 

    To achieve the above, we have added a RunOnce key with a command to check for any pending RunOnce keys. If a RunOnce key is present it would invoke explorer if not present, invoke eshell.

    But the issue we have is RunOnce key created are not in order or we are not able to control the order of execution. Because of this eShell is been invoked during the installations.

    The RunOnce key we are creating for checking the pending RunOnce keys should be executed first to avoid wrong invocation. But what we understand  from windows documentation is that we cannot restrict the run order of the RunOnce keys. 

    We need help in resolving this issue.

    Thanks.

    Thursday, July 17, 2014 7:07 AM

All replies

  • Playing with the registry keys as you described can get a little messy. How about a different solution? Have eshell launch an application that checks for the updates. If the update is there, then launch explorer.exe, if no update available, launch the main application.

    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WE8S, Pro Guide to WES 7, Pro Guide to POS for .NET

    Thursday, July 17, 2014 3:13 PM
    Moderator
  • Thanks for your reply.

    The updates here are pending installations which are supposed to be started on OS boot up.

    On successful completion of the command RunOnce keys are deleted, then shell is launched.

    So, when eshell (which is launched as system shell) is launched, the RunOnce will have been deleted, hence it shall not be able to detect the pending tasks. 

    So, all applications invoked from eshell will actually parallel to the installer, which is not desirable.

    So need to do it only from the RunOnce keys I guess.

    Moreover I need to decide whether to launch eshell or explorer. So decision has to be made by someone running before shell is launched. It is only RunOnce key.

    Can you suggest any other approach?

    Friday, July 18, 2014 5:28 AM
  • The only approach I have is to have a different shell program sit between eshell and the final application to be launched. this application does the checking for updates.

    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WE8S, Pro Guide to WES 7, Pro Guide to POS for .NET

    Friday, July 18, 2014 3:56 PM
    Moderator