View Full Version : Terminate setup if specific application is running?
alexzfirm
07-09-2007, 05:03 PM
Can I pre-check if specific application is running without writing custom action?
If custom action is the only one way - how do I wire it up to terminate installation? The help section on "Terminate Installation" action is way too short and does not have any samples...
Alex
Lorne
07-10-2007, 10:13 AM
An easier way to do this would be to use the bootstrapper, and script it in Lua. The bootstrapper has the ability to check for other processes and window handles, so you could easily make the launching of the MSI conditional on that information.
As for doing it without the bootstrapper, I think you'd need to use a custom action of some kind to detect whether the target application is running (I don't know if there is any built-in mechanism to do this in MSI, so it would probably need to be done using a DLL or some VB script or something). To exit the installation, you would add a Terminate Installation action and sequence it after your custom "app detection" action with a condition based on the result of that "app detection" action.
alexzfirm
07-10-2007, 10:24 AM
An easier way to do this would be to use the bootstrapper, and script it in Lua. The bootstrapper has the ability to check for other processes and window handles, so you could easily make the launching of the MSI conditional on that information.
Could you point to the some kind of sample ?
Thank you
Lorne
07-10-2007, 10:43 AM
See the following actions (under "Action Reference") in the IRMakeBootStrap.chm help file:
Application.Exit
System.EnumerateProcesses
Window.EnumerateProcesses
Window.EnumerateTitles
The Scripting Guide chapters will be useful as well.
The default bootstrap scripts are located in the Bootstrap\Data subfolder (e.g. Bootstrap\Data\default_embed_setup.lua) and can be read using a text editor. (Note: do not modify the default files, make a copy first.)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.