Guest dawnwind Posted September 15, 2009 Posted September 15, 2009 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? I have written the flowing code in startup callbak 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.