Replacing the shell on WinXP
From: Mike Warren (miwa_at_NOSPAMiprimus.com.au)
Date: 12/07/03
- Next message: Johnny Hansen: "Re: Help with SetComputerNameEx"
- Previous message: Ben Hochstrasser [FF]: "Re: CreateProcess and controlling the console"
- Next in thread: Mathias Rauen: "Re: Replacing the shell on WinXP"
- Reply: Mathias Rauen: "Re: Replacing the shell on WinXP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 7 Dec 2003 20:19:09 +1000
Hi,
Sorry for the long post. I am at my wits end as I have been
trying to find a solution to this problem for nearly 12 months.
I need to replace explorer with my program as the windows
shell but have a problem...
I use the following registry entry to set the shell to my program:
HKEY_LOCAL_MACHINE
\Software
\Microsoft
\Windows NT
\CurrentVersion
\Winlogon Shell=MyProgName.exe
When Windows starts up, my program starts fine but the
windows logon screen covers my app and won't go away
for another 25 to 30 seconds. This is the light blue screen
with darker blue bands at the top and bottom that has a small
windows logo on it and says "Loading Personal Settings...".
I am able to overcome this delay by setting "LogonType=1"
(normally 0). This causes WinXP to boot more like Win2K
and doesn't show the blue screen.
The problem with this is that a dialog opens at start-up requesting
a password even though a password is not set.
This in turn can be overcome by setting "AutoAdminLogon=1".
However, this setting will very intermittently set itself back to
"AutoAdminLogon=0" and requires the enter key to be pressed
to continue. I am unable to find a pattern to when this happens
but may be related to the power cord being pulled out of the
computer. I have tried explicitly resetting this key on every boot
but it doesn't seem to help.
When the password dialog opens, the computer is effectively
dead as there is no keyboard or mouse connected to it and
restarting will not fix it. This means a service call as the customer
has no easy means to connect a keyboard to the computer. And
besides, the monitor is switched off until my program is running
so all the customer knows it that the machine did not start.
I can think of some possible cures but haven't been able to work
out how to implement any of them:
1/ Communicate with WinLogon.exe in the same way explorer
must when it is the shell. I am guessing that WinLogon.exe in
generating my problem screen as it is the only program to
showup in a process list other than my program.
(From my test program)
WINLOGON.EXE - NetDDE Agent - NDDEAgnt
SHELLTEST.EXE - Windows XP Shell Test Program - TForm1
SHELLTEST.EXE - - TPUtilWindow
SHELLTEST.EXE - Shelltest - TApplication
2/ Somehow generate a Ctrl+Alt+Del key sequence. This will
close the problem screen and start task manager which I could then
close by sending it a message from my program. (I have tried starting
task manager from my program but it doesn't remove the problem
window.)
3/ Use the method I am using now and somehow generate an
"Enter" keypress. This would have to be done with some custom
hardware pretending to be a keyboard as I don't think I can start
a program before the password window opens.
I have written a small test app that shows the problem and can
post it to the attachments group if anyone is interested.
Please help. Even if you can suggest where I might be able to find
some information on how WinXP handles this area.
-Mike
- Next message: Johnny Hansen: "Re: Help with SetComputerNameEx"
- Previous message: Ben Hochstrasser [FF]: "Re: CreateProcess and controlling the console"
- Next in thread: Mathias Rauen: "Re: Replacing the shell on WinXP"
- Reply: Mathias Rauen: "Re: Replacing the shell on WinXP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|