Re: Auto Restart a Custom Shell on termination
From: YaronM (nospam)
Date: 12/25/04
- Next message: Yasutaka Nakamura: "Nortel VPN software doesn't work"
- Previous message: KM: "Re: Auto Restart a Custom Shell on termination"
- In reply to: KM: "Re: Auto Restart a Custom Shell on termination"
- Next in thread: YaronM: "Re: Auto Restart a Custom Shell on termination"
- Reply: YaronM: "Re: Auto Restart a Custom Shell on termination"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 25 Dec 2004 22:50:27 +0200
Hi KM,
I think I will take your approach and use a VB launcher application plus the
explorer renaming.
I will change the NTFS ACL of the MS-explorer to SYSTEM and local Admin,
that will solve the system components you meantioned.
I will post some info on my progress in the NG when I will succeed on doing
that.
many thanks for all your help.
YaronM
"KM" <konstmor@nospam_yahoo.com> wrote in message
news:eJFoBor6EHA.2632@TK2MSFTNGP10.phx.gbl...
> Slobodan,
>
> Right guess. The userinit.exe does use hardcoded explorer.exe (more
> presicely - %SystemRoot%\explorer.exe). Easy to find out with an Unicode
> binary search.
>
> When I deal with different shells for Windows OSes I also prefer writing
> my own agent app that will take care of launching whatever I need to
> depending on user rights. Just more control from my own code :-)
>
>
> Yaron,
>
> Anyway, there is possible another trick (on NTFS only, though):
> - have explorer.exe as default shell for any user. AutoRestartShell=1
> - after build, rename the explorer.exe to something like MSexplorer.exe
> - rename your custom shell app to explorer.exe
> - have a peice of code in your custom shell app to launch explorer.exe
> (e.g., CreateProcess). If MSexplorer.exe launched properly, do nothing
> then.
> - at runtime lock down MSexplorer.exe access permission (NTFS security)
> to Admin account only. (or automate this with cacls.exe during FBA).
>
> I have never tried this but it may work just fine.
> Only problems we can expect from some system components that have
> explorer.exe hardcoded and rely on some MS explorer.exe functionality
> much.
>
>
> Also, regarding the scripting you posted the link to... You are probably
> aware that most of the scripts there are based on WMI. WMI component stack
> is pretty heavy, especially for a Minlogon image. Also, from performance
> point of view, a monitoring script is way too worse than you own app (even
> VB based, but C++ is definitely better). Also,
>
> Regards,
> Konstantin
>
>> Hi Yaron,
>>
>> I'm still wondering why this functionality do not work for your shell
>> also.
>> Personally I would prefer to solve this problem rather than to write
>> application for this purpose. Especially since functionality is
>> already there.
>>
>> Problem might be with userinit.exe program that use hardcoded
>> explorer.exe file name for some purposes. Maybe (just maybe) if your
>> application was called explorer.exe autorestart would work for you.
>>
>> In mean time you can use similar approach that I use on minlogon images.
>> Your first program that is started should launch "your shell" and stay
>> active in background.
>> Now when your shell is closed you can respawn it again. Also you can use
>> this application to control/implement software and hardware
>> WDT features if you need them.
>>
>> Regards,
>> Slobodan
>>
>> "YaronM" <nospam> wrote in message
>> news:uub8Nyo6EHA.3616@TK2MSFTNGP11.phx.gbl...
>>> Hi Slobodan and KM,
>>>
>>> I start my custom shell as described in
>>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxpesp1/html/tchDifferentShellsForDifferentUsers.asp
>>> the default shell is Explorer.exe and is used for the local
>>> administrator.
>>> the Custom-Shell is user specific and is used for a limited-user
>>> account.
>>> I tried using the AutoRestartShell Dword but it only affect the
>>> Explorer..
>>> I'm thinking maybe to create somekind of a KeepAlive service that will
>>> monitor the task list and will re-launch the shell if it fails..
>>> I understood that I can't mix Minlogon and Winlogon but I still need
>>> this
>>> functionality.
>>>
>>> any ideas would be great.
>>>
>>> thanks,
>>>
>>> YaronM
>>>
>>>
>>> "KM" <konstmor@nospam_yahoo.com> wrote in message
>>> news:%23ewy5le6EHA.3756@TK2MSFTNGP14.phx.gbl...
>>> > Yaron,
>>> >
>>> > Tha Config flag is Minlogon specific.
>>> > With Winlogon you should use AutoRestartShell dword flag.
>>> >
>>> > Minlogon and WInlogon can't be mixed as they esensially provide
>>> > similar
>>> > functions (with a bit different approach) and have the same name
>>> > binaries.
>>> >
>>> > How do you start your own custom shell application?
>>> >
>>> > KM
>>> >
>>> >> thanks Solobodan. I saw the setting you mention in the minlogon
>>> >> component.
>>> >> I currently use the "Windows Logon (Standard)" component and it
>>> >> doesn't
>>> >> have it.
>>> >> I'm not sure if I can add both milogon and the "Windows Logon
>>> >> (Standard)"
>>> >> and which one will take effect.
>>> >>
>>> >> basically, what I am trying to achive is to have the Explorer as the
>>> >> default Shell and my Custom-Shell as an alternative shell that I will
>>> >> manually configure for a specific user. and I need both Explorer and
>>> >> my
>>> >> Custom-Shell to be AutoRestarted when they accidently crash.
>>> >>
>>> >> thanks,
>>> >>
>>> >> YaronM
>>> >>
>>> >>
>>> >> "Slobodan Brcin (eMVP)" <sbrcin@ptt.yu> wrote in message
>>> >> news:%234guZ9Y6EHA.3076@TK2MSFTNGP15.phx.gbl...
>>> >>> http://groups-beta.google.com/group/microsoft.public.windowsxp.embedded/msg/3592185ea728a439
>>> >>>
>>> >>> Regards,
>>> >>> Slobodan
>>> >>>
>>> >>> "YaronM" <nospam> wrote in message
>>> >>> news:OyMeD1Y6EHA.2876@TK2MSFTNGP12.phx.gbl...
>>> >>>> Hello,
>>> >>>>
>>> >>>> I'm testing my new custom shell on XPe.
>>> >>>> I've tried using the AutoRestartShell = 1 registry value to force
>>> >>>> windows to
>>> >>>> reload my custom shell in case of an unexpected termination.
>>> >>>> unfortunately,
>>> >>>> it doesn't work.
>>> >>>>
>>> >>>> I thought about creating a new system-service application that will
>>> >>>> monitor
>>> >>>> the custom-shell, but I don't know how to accomplish that
>>> >>>> programmatically.
>>> >>>>
>>> >>>> what techniques do you use to get your shell to auto restart?
>>> >>>>
>>> >>>> thanks in advance,
>>> >>>>
>>> >>>> YaronM
>>> >>>>
>>> >>>>
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
- Next message: Yasutaka Nakamura: "Nortel VPN software doesn't work"
- Previous message: KM: "Re: Auto Restart a Custom Shell on termination"
- In reply to: KM: "Re: Auto Restart a Custom Shell on termination"
- Next in thread: YaronM: "Re: Auto Restart a Custom Shell on termination"
- Reply: YaronM: "Re: Auto Restart a Custom Shell on termination"
- Messages sorted by: [ date ] [ thread ]