Acting as advisor for wcmd-uplift project?

Steven Edwards winehacker at
Sat Dec 26 13:33:08 CST 2009

On Sat, Dec 26, 2009 at 1:57 PM, Erich Hoover <ehoover at> wrote:
> Are you using a real cmd.exe or the Wine cmd.exe?  I encountered a problem
> at one point with using a real cmd.exe with CreateProcess, I never actually
> finished tracking it down though b/c it wasn't an issue with the
> Wine-included cmd.exe.

I wrote a telnet server that worked on Wine and Windows using
CreateProcess. See if somthing like the following helps

const char *name = "c:\\windows\\system32\\cmd.exe";
const char *cmd = NULL;

 if (!CreateProcess((LPSTR) name,              // executable module
                      (LPSTR) cmd,               // command line
                      NULL,                      // process security attributes
                      NULL,                      // primary thread
security attributes
                      TRUE,                      // handles are inherited
                      DETACHED_PROCESS +         // creation flags
                      NULL,                      // use parent's environment
                      NULL,                      // use parent's
current directory
                      &si,                       // startup info
                      &piProcInfo)) {
     ErrorExit("Create process failed");

Steven Edwards

"There is one thing stronger than all the armies in the world, and
that is an idea whose time has come." - Victor Hugo

More information about the wine-devel mailing list