How to use CreateProcessWithLogonW
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
);
How to logon to a remote machine on the LAN and start a process?
Hi folks,
I am currently facing the problem as specified in the topic question. All I need to do is logon to a remote machine in the LAN and start an executable. The catch is I cannot use sockets. CreateProcessWithLogonW allows me to logon to the domain on my own machine using a different user id and password but how to achieve the same on a remote machine. Is it possible? If yes, kindly guide me.
ciao.