Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

Detect if application is running at start of install

Basic MSI
Is there a way to detect whether or not an application is running at the start of the install? If it is, cancel the install?

I would be try to detect an application that I am not installing with the installer.

Labels (1)
0 Kudos
(1) Reply
Flexera Alumni

MSI has functionality to see if a file you're installing is locked by another process (see InstallValidate, FilesInUse, MsiRMFilesInUse, etc.), but no built-in method for testing an arbitrary executable.

Common practices seem to be to use Is(FILE_LOCKED, ...) in an InstallScript custom action if you know where the executable is; or to use FindWindow to find a window handle for the application if it has a unique window class name. Beyond that, some use Windows APIs or WMI or the like to loop over the process list to find a particular process...
0 Kudos