Aus einem Setup heraus ein MSI-Packe installieren
unter Windows 2000 mit _LauchAppEx.
Fehler:
WaitForSingleObject(piData.hProcess, nTimeOut);
Kommt nie mehr zurück. Und die GUI's des MSI
werden nicht angezeigt.
Hinweis:
Wenn ich das Setup debugge läuft das Setup einwandfrei.
-------------------------------------------------------------------
//Sorce von InstallShield
//
//Extended Version of LaunchAppAndWait
//Written by Stefan Krueger
//LauchAppEx.zip File size: 2.598 bytes Last update: 2000-11-29
//Aufruf------------------------------------------------------------------------------------
_LaunchAppEx(WINSYSDIR ^ "msiexec.exe", "\i xx.msi", WAIT, SW_SHOWNORMAL, -1, nvExitCode)
//------------------------------------------------------------------------------------------
function _LaunchAppEx(szProgram, szCmdLine, nWait, nShow, nTimeOut, nvExitCode)
STARTUPINFO siData;
PROCESS_INFORMATION piData;
begin
siData.cb = 68;
siData.lpReserved = NULL;
siData.lpDesktop = NULL;
siData.lpTitle = NULL;
siData.dwX = 0;
siData.dwY = 0;
siData.dwXSize = 0;
siData.dwYSize = 0;
siData.dwXCountChars = 0;
siData.dwYCountChars = 0;
siData.dwFillAttribute = 0;
siData.dwFlags = 1; //STARTF_USESHOWWINDOW
siData.wShowWindow = nShow;
siData.lpReserved2 = NULL;
siData.hStdInput = NULL;
siData.hStdOutput = NULL;
siData.hStdError = NULL;
if (CreateProcessA(NULL, szProgram + " " + szCmdLine, NULL, NULL,
TRUE, 0, NULL, NULL, &siData, &piData) = 0) then
return (-1);
endif;
if ( nWait != WAIT ) then
nvExitCode = 0;
return 0;
endif;
WaitForSingleObject(piData.hProcess, nTimeOut); <----Problem
GetExitCodeProcess(piData.hProcess, &nvExitCode);
return 0
end;
Frage:
Weis jemand wieso sich der Prozess unter Windows
2000 mit msiexec.exe bei der RunTime Version anders verhaelt.
Danke fuer die Hinweise!!