Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Multiple CreateProcess inside a CA fail


3 replies to this topic

dcantemir

dcantemir
  • Members
  • 3 posts

Posted 30 August 2005 - 11:44

Hi,
I'm trying to create an installer using Installshield Express X. I have a custom action invoked at the end of installation that needs to succesively launch with CreateProcess about 20 small processes. When run on a Win2K SP4 machine the 14th process returns error code 128 (ERROR_WAIT_NO_CHILDREN - "There are no child processes to wait for."). The problem seems to be related to the following Microsoft KB article http://support.micro...kb;en-us;156484 (Process Launched with CreateProcess() May Terminate Prematurely) and http://support.micro...kb;en-us;184802 (PRB: User32.dll or Kernel32.dll Fails to Initialize). Do you happen to know a workarround?

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 30 August 2005 - 22:25

Assuming you wrote your own DLL, maybe you can use ShellExecute() instead of CreateProcess()?
Otherwise, consider to wait for each process to finish, before starting the next.

dcantemir

dcantemir
  • Members
  • 3 posts

Posted 31 August 2005 - 08:34

I didn't tried ShellExecute(Ex), but I assume it is a wrapper arround CreateProcess(). As for the second advice, that's what my DLL does: launches a process, wait for it to finish and then log the exit code and so on for every process in the list. Alternatively I tried to create a batch file (.cmd) that starts and waits every process, but the result is the same. The DLL is loaded in the context of Windows Installer (msiexec.exe) Windows server running in SYSTEM context.
In between I discovered a workaround: I moved the code from DLL custom action into a EXE custom action and everything seens to work fine.

dcantemir

dcantemir
  • Members
  • 3 posts

Posted 31 August 2005 - 11:58

I finally found the cause of the 128 error code: the 14th process cannot find a DLL installed in another folder (event if the installer updates the PATH, the PATH system variable does not get updated -- for the running processes).