Why does Windows in kiosk mode start the shell application so slowly

bootwindows 7

I'm configuring Windows 7 Professional x64 to run a custom application as the shell, in "kiosk" mode. That is, replacing the default shell (explorer.exe) with my application and autologon as a specific user.

[HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultUserName"="applicationuser"
"Shell"="c:\Program Files\my-app\whatever.exe"

I've also turned off the Windows logo splash screen on boot (in msconfig). The machine is not on any domains.

When I power on the machine, I see the BIOS screen, then a black screen (where the Windows logo would have been), then the user logon page flashes by quickly (during autologon), then it sits at a blank screen for several minutes.

The cursor is on screen but inoperable. And I'm fairly certain it's not my application, because when I run it in a regular desktop scenario, it starts very quickly. This is a bad experience for the user that's starting up the kiosk or may be approaching the kiosk after it's been booted, but before the application starts.

Does anyone know what Windows is doing behind the scenes in kiosk mode that might explain this delay? Or how to track down what's happening?

Or does anyone have any fancy ideas on tricking the user into thinking the kiosk is operating? (I don't know what else I have control over at this point in Windows kiosk startup… can I splash up a background image instead of the drab geen/blue screen?)

Best Answer

Most likely you are not telling Winlogon that you're application is ready to go. Put the following code at the top of main() (this is all C++ so you may have to translate to your language of choice):

/*
 * Signal to Winlogon that the shell has started and the login screen can be dismissed
 */
HANDLE hShellReadyEvent;
hShellReadyEvent = OpenEvent(EVENT_MODIFY_STATE, false, L"msgina: ShellReadyEvent");
if( hShellReadyEvent != NULL )
{
    SetEvent( hShellReadyEvent );
    CloseHandle( hShellReadyEvent );
}

This will shave at least 30 seconds from your start-up process.

Related Topic