cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kaneohe
Level 6

Need Custom Action Advice

ProjectType: InstallScript MSI

With our installation we create two services (SA and SB). Toward the end of the installation we want to use CAs to start up the services, wait for them to come up completely, then launch another process (PA) that depends on SA being up and running. If the SA service does not start up for some reason we don't want to launch PA. Instead we want to show a warning message. The wrinkle comes when SA launches eight child processes (P1-P8). These have a tendancy to bounce up and down if everything isn't "just right" and it is really P1-P8 that we depend upon, not SA itself.

The best I've come up with so far is to run an InstallScript function to check the state of the Windows service and pause for a period of time while the service launches P1-P8. This method does not work if P1-P8 are bouncing as Windows thinks the service is up and running but the processes we depend on are not.

Does anyone have any ideas on how to approach this scenario? We are not above writing DLL helper functions as we've done this several times already. Any thoughts on this would be greatly appreciated.
Labels (1)
0 Kudos
(2) Replies
Christopher_Pai
Level 16

If you want my honest opinion, it sounds like your trying to fix an application design problem on the back end with the install.

I've been there and done that and will testify that this rarely ends well. I'd clean up the services and the dependency on them so that the install doesn't need CA's; it just uses the Sevicecontrol table to fire it all up and always launch's the EXE which is then expected to handle not being able to communicate with the services in a graceful way.
0 Kudos
kaneohe
Level 6

I guess we could just launch the EXE like we are now and not try to be preemptive. The EXE we launch is not really a full-blown EXE. It's actually a Wise Script installer that's running as a plain executable (i.e. a wrapper executable). The author needed a solution and he only knew Wise Script at the time so that's what we got stuck with. I'll have to investigate the possibility of either doing this in a regular executable or possible a DLL call that gets added to our installation helper DLL.
0 Kudos