P
Peter
I am using CreateProcessWithLogonW to run an external application, the
problem I am having is that the C# program does not wait until the external
program finishes running before continuing. The external program is a
console application and it does not interact with users, how can I make my
C# program wait until the program initiated by CreateProcessWithLogonW API
completes running before continuing?
here's my API code.
bool ret = CreateProcessWithLogonW(_logonName, _domain,
_password,
LOGON_WITH_PROFILE, null, sb,
NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT,
IntPtr.Zero, "c:\\",
ref startInfo, out processInfo);
Peter
problem I am having is that the C# program does not wait until the external
program finishes running before continuing. The external program is a
console application and it does not interact with users, how can I make my
C# program wait until the program initiated by CreateProcessWithLogonW API
completes running before continuing?
here's my API code.
bool ret = CreateProcessWithLogonW(_logonName, _domain,
_password,
LOGON_WITH_PROFILE, null, sb,
NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT,
IntPtr.Zero, "c:\\",
ref startInfo, out processInfo);
Peter