Apr 27, 2020
06:07 PM
Here's how I got it to work: NUMBER stdOutHandle;
NUMBER stdErrHandle;
SECURITY_ATTRIBUTES securityAttributes;
begin
// redirect stdout and stderror. need to use the win32 CreateFile
// because the installshield functions return non-win32 handles
securityAttributes.nLength = SizeOf(securityAttributes);
securityAttributes.bInheritHandle = TRUE;
stdOutHandle = KERNEL32.CreateFileA(stdOutFile, (GENERIC_READ | GENERIC_WRITE), FILE_SHARE_READ,
&securityAttributes, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
stdErrHandle = KERNEL32.CreateFileA(stdErrFile, (GENERIC_READ | GENERIC_WRITE), FILE_SHARE_READ,
&securityAttributes, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
LAAW_STARTUPINFO.hStdInput = NULL;
LAAW_STARTUPINFO.hStdOutput = stdOutHandle;
LAAW_STARTUPINFO.hStdError = stdErrHandle;
LAAW_STARTUPINFO.dwFlags = LAAW_STARTUPINFO.dwFlags | STARTF_USESTDHANDLES;
LAAW_PARAMETERS.bInheritHandles = TRUE;
launchAppResult = LaunchAppAndWait(app, args, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN);
CloseFile(stdOutHandle);
CloseFile(stdErrHandle);
... View more
Latest posts by russman
Subject | Views | Posted |
---|---|---|
1677 | Apr 27, 2020 06:07 PM |
Activity Feed
- Posted Re: Capturing screen (screen scraping) output from LaunchApplicaiton() on InstallShield Forum. Apr 27, 2020 06:07 PM