locked
elevate privileges to system RRS feed

  • Question

  • Is it possible to somehow run command line application under local SYSTEM account? Either by hand, script, WinAPI or whatever. I need to test code that will eventually run as a service. I tried calling LogonUser function like this:

    LogonUser(L"SYSTEM", L".", L"", LOGON32_LOGON_BATCH,LOGON32_PROVIDER_DEFAULT,&token);

    but is says 1326: Logon failure: unknown user name or bad password.

    Is it possible to logon SYSTEM account using this function? Of course I'm in Administrators group.

    Thanks in advance,
    Monday, January 26, 2009 9:33 AM

All replies