1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

How to auto logon windowsxp in winlogon notification package?

Discussion in 'Windows Security' started by dawnwind, Sep 14, 2009.

  1. dawnwind

    dawnwind Guest

    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.
     

Share This Page