none
Automatic startup of other applications before starting custom shell? RRS feed

  • Question

  • Hi all,

    I plan on using a custom shell launcher for a dedicated application, but need to automatically start a few other applications before the shell upon logon. 

    In Microsoft's documentation for the Shell Launcher, it's stated that "Shell Launcher processes the Run and RunOnce registry keys before starting the custom shell, so your custom shell doesn’t need to handle the automatic startup of other applications and services." 

    But from what I understand from this Microsoft answer, the Run\RunOnce registry keys will only be processed if the user logging in is an administrator.

    So my question is : what should be done in order to run the startup applications before the shell even if the user isn't an admin? Could I use the task scheduler to schedule tasks to be run at logon? Are they guaranteed to run before the shell is launched?

    Thanks,

    Ron


    • Edited by RonM14 Thursday, August 7, 2014 11:46 AM
    Thursday, August 7, 2014 9:49 AM

All replies

  • Hi,

    that's interesting. Seems that we have to do something that documentation pretends to be not neccessary: As a workaround, you can create a script, e.g. a CMD file, which launches the processes you've intended with your Run/RunOnce entries.

    This results in an unlovely effect where users can see the command window. This can be hidden as described Here, but this - what surprise - has another bad effect: WSCRIPT returns immediately after the CMD process has launched. With other words you have to set Shell Launcher's return action to "Do nothing" and handle the action within your application or the batch script  that was launched, somethin like:

    REM startup.cmd - launched by wscript.exe
    
    REM Windows app may return immediately after launch, use WAIT
    START /WAIT MyApp.exe
    
    REM Process exit codes
    IF %ERRORLEVEL% ... 
    GOTO DEFAULT
    
    REM Unhandled exit code, do something other, e.g. log off
    :DEFAULT
    shutdown /l

    Regards,
    Willi K

    Thursday, August 7, 2014 1:57 PM
  • How about creating an application that is launched as the shell that launches all the applications including your main application? Would something like that work in your case?

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

    Thursday, August 7, 2014 3:12 PM
    Moderator
  • I'll try that, thanks

    Ron

    Wednesday, August 13, 2014 12:41 PM
  • John and I create sjj_shell for this purpose: http://annabooks.com/SW_SJJ_SHELL.html

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

    Wednesday, August 13, 2014 11:56 PM
    Moderator