Hi Dave,
It seema to me that it should be the same as in InstallShield5. I used it with InstallShield5.
Now I use this code in WI as a InstallScript:
app.h file
// In the global section paste the following:
#define STILL_ACTIVE 0x00000103L
//
// dwCreationFlag values (from WINBASE.H)
//
#define DEBUG_PROCESS 0x00000001
#define DEBUG_ONLY_THIS_PROCESS 0x00000002
#define CREATE_SUSPENDED 0x00000004
#define DETACHED_PROCESS 0x00000008
#define CREATE_NEW_CONSOLE 0x00000010
#define NORMAL_PRIORITY_CLASS 0x00000020
#define IDLE_PRIORITY_CLASS 0x00000040
#define HIGH_PRIORITY_CLASS 0x00000080
#define REALTIME_PRIORITY_CLASS 0x00000100
#define CREATE_NEW_PROCESS_GROUP 0x00000200
#define CREATE_UNICODE_ENVIRONMENT 0x00000400
#define CREATE_SEPARATE_WOW_VDM 0x00000800
#define CREATE_SHARED_WOW_VDM 0x00001000
#define CREATE_FORCEDOS 0x00002000
#define CREATE_DEFAULT_ERROR_MODE 0x04000000
#define CREATE_NO_WINDOW 0x08000000
//prototype HHideAppAndWait(STRING, STRING, NUMBER);
prototype BOOL kernel32.CreateProcessA(POINTER, STRING, POINTER,
POINTER, BOOL, NUMBER, POINTER, POINTER, POINTER,
POINTER);
prototype BOOL kernel32.GetExitCodeProcess(NUMBER, POINTER);
prototype NUMBER kernel32.WinExec(STRING, NUMBER);
typedef STARTUPINFO
begin
NUMBER cb;
POINTER lpReserved;
POINTER lpDesktop;
POINTER lpTitle;
NUMBER dwX;
NUMBER dwY;
NUMBER dwXSize;
NUMBER dwYSize;
NUMBER dwXCountChars;
NUMBER dwYCountChars;
NUMBER dwFillAttribute;
NUMBER dwFlags;
// the following is actually two words, but we know
// we want 0 as the value, so we cheat & create one NUMBER
NUMBER wShowWindow;
//WORD cbReserved2;
POINTER lpReserved2;
HWND hStdInput;
HWND hStdOutput;
HWND hStdError;
end;
typedef PROCESS_INFORMATION
begin
NUMBER hProcess;
HWND hThread;
NUMBER dwProcessId;
NUMBER dwThreadId;
end;
function ...
STARTUPINFOsi;
PROCESS_INFORMATIONpi;
STRING szCommand[126];
NUMBERnExitCode;
.......
szCommand = "[PathToexefile] [Param]";
kernel32.CreateProcessA
(NULL, //lpApplcationName
szCommand, //lpCommandLine
NULL,//lpProcessAtrributes
NULL,//lpThreadAttributes
TRUE,//bInheritHandles
//CREATE_NEW_CONSOLE | CREATE_NO_WINDOW | HIGH_PRIORITY_CLASS,//dwCreationFlags
CREATE_NO_WINDOW,//dwCreationFlags
NULL,//lpEnvironment
NULL,//lpCurrentDirectory
&si,//lpStartupInfo
&pi);
// wait finished apps
repeat
kernel32.GetExitCodeProcess(pi.hProcess, &nExitCode);
until (nExitCode != STILL_ACTIVE);
end
Good luck!