Command Reference
Locates and closes a running program.
Action ID: 6
Action Category: Open/Close Programs
Select the method to use in order to determine whether or not the program is running:
The Name field specifies the full path and filename of the program to find (e.g. "C:\Program Files\Setup Factory 6.0\SUF60Design.exe").
The Name field specifies only the filename of the program to find (e.g. "SUF60Design.exe").
The Name field identifies the title of the Window that should be closed (e.g. "Untitled - Setup Factory 6.0").
The full path and filename, filename only, or window title of the program to look for. (The meaning depends on which Look for option is selected.)
Select the action to be taken if Setup Factory determines that the program is running:
Send the program a WM_CLOSE message. This allows the program to end in the usual fashion. This is exactly like selecting Close in the title bar menu of the program's window, or using the Alt-F4 hotkey to close the program.
Note: If for some reason the program is unable to close, the program window will be brought to the front. For example, the user may need to save a file before the program can exit. In that case, bringing the program's window to the front should allow the user to see and respond to any error message the program may be displaying.
Immediately terminate the program's process. The state of global data maintained by the program's dynamic-link libraries (DLLs) may be compromised if this option is used. (When this option is selected, the setup executable calls the Windows API function "TerminateProcess" to immediately terminate the specified program.)
Display a "Retry/Cancel" message box that tells the user to manually shut down the program. The user must close the specified program manually and then click the Retry button to continue with the installation.
When this option is selected, the Program Description field is enabled so a user-friendly description of the program can be provided.
Allows you to provide a user-friendly name for the program that needs to be closed. Use a name or description that will be more helpful to the user than the program's filename or window title.
Determines whether the program must be closed in order for the setup to continue.
If selected, this action will not finish until the program is closed successfully (or the user quits the setup).
If unselected, the action will complete without waiting for the program to close. Even if the program isn't closed, the setup will proceed normally.
|
Value |
Simple Message |
Verbose Message |
|
0 (OK) |
|
|
|
1 |
Failed to close program. |
<<Name>> |
In this example we will close Notepad if it is running on the user's system.
Look for: File name only
Name: Notepad.exe
If Program is Running: Send close message
Program must be closed to continue: TRUE
In this example we will see if Notepad is running on the user's system, and we will ask that the user close Notepad before they continue with the installation.
In this case, if the user chooses to leave Notepad running, we'll let the installation continue.
Look for: File name only
Name: Notepad.exe
If Program is Running: Tell the
user to close the program
Program description: Notepad
Program must be closed to continue: Unchecked
See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab