I'm sorry again. :( The actual code follows:
-----------------------------------
CreateProcess (
comspec,
cmd,
0,
0,
0,
CREATE_NEW_CONSOLE,
0,
lpath,
&start,
&inf);
WaitForSingleObject (inf.hProcess, INFINITE);
CloseHandle (inf.hProcess);
CloseHandle (inf.hThread);
------------------------------
The following code produces the comspec variable to get the cmd.exe path:
------------------------------
ExpandEnvironmentStrings ("%comspec%", &comspec, 256);
------------------------------
The following code builds the string for the program to run:
------------------------------
static void writecmd (void)
{
strcpy (cmd, "/c \"");
strcat (cmd, exomdir);
strcat (cmd, "\\exomizer.exe\" sfx basic -t");
//itoa (systxt, flags.sys, 10); strcat (cmd, systxt);
sprintf (systxt, "%d", flags.sys); strcat (cmd, systxt);
strcat (cmd, " -x1 -o ");
strcat (cmd, file);
strcat (cmd, " ");
strcat (cmd, file);
strcat (cmd, "&pause");
}
file is the file to feed to exomizer.exe. lpath is the folder that contains the file fed to exomizer.exe.
Does this help?