Jump to content

How to auto logon windowsxp in winlogon notification package?


Recommended Posts

Guest dawnwind
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...