If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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? 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. |
Ads |
Thread Tools | |
Display Modes | |
|
|