Mombu the Microsoft Forum

Go Back   Mombu the Microsoft Forum > Microsoft > How to auto logon windowsxp in winlogon notification package?
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 15th September 07:06
dawnwind
External User
 
Posts: 1
Default How to auto logon windowsxp in winlogon notification package?



Hi all
I have write a winlogon notification package for WindowsXP. It will show a
dialog in Startup event. And I want login automatically, how to do this?


LogonUser( TEXT("Administrator"),NULL,TEXT("111"),
LOGON32_LOGON_INTERACTIVE,LOGON32_PROVIDER_DEFAULT ,&hToken);

HDESK hDesk = ::CreateDesktop( _T("WinSta0\\Default"), NULL, NULL,
DF_ALLOWOTHERACCOUNTHOOK, GENERIC_ALL, NULL );

SwitchDesktop( hDesk );
bRet = ::CreateProcessAsUser( hToken,

NULL, _T("explorer.exe"), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );

It will get BSOD at CreateProcessAsUser. Is there some thing I missed? How
can I do this?

Thanks very much.
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666