adegbola
January 25th, 2003, 01:07 PM
I have been trying to get my code to log on as another user and start a process on the local computer "ROUGHRIDER8" using another local users credentials "oluwaseun/oluwaseun".
My code generates error 87 i.e. The parameter is incorrect. ERROR_INVALID_PARAMETER
Can anyone offer code that works or any guideline on this new SDK API. My Operating system is Windows 2000 using Visual C++ 6.0 SP4
Cheers
Gbola
Code
BOOL ki=CreateProcessWithLogonW(
L"oluwaseun", // user's name
L"ROUGHRIDER8", // user's domain
L"oluwaseun", // user's password
CREATE_DEFAULT_ERROR_MODE+CREATE_NEW_CONSOLE+CREATE_NEW_PROCESS_GROUP,//LOGON_NETCREDENTIALS_ONLY, // logon option
(LPCWSTR)&jola[0], // executable module name
NULL, // command-line string
NORMAL_PRIORITY_CLASS, // creation flags
NULL, // new environment block
L"c:\\", // current directory name
NULL, // startup information
&procinfo // process information
);
My code generates error 87 i.e. The parameter is incorrect. ERROR_INVALID_PARAMETER
Can anyone offer code that works or any guideline on this new SDK API. My Operating system is Windows 2000 using Visual C++ 6.0 SP4
Cheers
Gbola
Code
BOOL ki=CreateProcessWithLogonW(
L"oluwaseun", // user's name
L"ROUGHRIDER8", // user's domain
L"oluwaseun", // user's password
CREATE_DEFAULT_ERROR_MODE+CREATE_NEW_CONSOLE+CREATE_NEW_PROCESS_GROUP,//LOGON_NETCREDENTIALS_ONLY, // logon option
(LPCWSTR)&jola[0], // executable module name
NULL, // command-line string
NORMAL_PRIORITY_CLASS, // creation flags
NULL, // new environment block
L"c:\\", // current directory name
NULL, // startup information
&procinfo // process information
);