1

When InstallShield executes, we have it launch a separate installer (before it's installation phase) that installs a small SQL server that's crucial to the program. FYI, the SQL server is Firebird SQL. When users re-install the program, we need to terminate the Firebird SQL server, which is just running as a background executable. We looked into the effects of forcefully terminating the exe and haven't experienced any negative effects.

So my question is how do we determine, in InstallShield, if an external program is running and to terminate the program if it is? The only reason I would want to detect if it's running is to avoid any error that might hinder or throw an error during an install. If that's not an issue, I could care less if we determine if it's running or not.

EDIT: Realistically, we only want to kill the exe because we're reinstalling it. So if it's possible, is there a way to tell InstallShield to skip executing an exe if another exe is running?

Cyprus106
  • 5,722
  • 6
  • 40
  • 48

2 Answers2

0

Install Firebird as a service and then use the ServiceControl table to stop the service. I can't imagine anything good coming from terminating a SQL server engine.

If you really want to kill it ( hopefully you are then copying in a new datafile so corruption isn't an issue ) then take a look at sample "List and Shut Down Running Applications" at http://www.installsite.org/pages/en/isp_ext.htm

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
0

There are 2 approaches for this problem:

  1. Skipping the second product (your SQL server) if it's running. For this you can use a custom action which detects the running process and sets an installer property based on the result. The property can then be used to condition the second installer.

  2. The second approach is to completely uninstall and then reinstall the second product when a repair is performed:

    • add a custom action which uninstalls the second product
    • condition it to run only for a repair (use REINSTALL property)
    • schedule it before the custom action which installs the product during first time install
    • modify the install custom action condition to also support repair, for example:

NOT Installed OR REINSTALL

Cosmin
  • 21,216
  • 5
  • 45
  • 60