SpringMVC
asked on
Inno Setup - Check if specific exe is running.
Hi.
I have inno setup script(in pascal), and I need to check before installation, if an application is running or not.
The problem is, that:
a) I can not use Mutex, because in my application mutex is created with name + version.
Inno Setup doesn't know particular version of the previously installed programm.
b) I can not use something like IsModuleLoaded('myapp.exe' ), because
there could be two different programms with same exe name, but in different folders.
And setup must allow to install to folder A, then the program from folder B\myapp.exe is running.
Any help would be highly appreciated!
P.S Sorry for my english
I have inno setup script(in pascal), and I need to check before installation, if an application is running or not.
The problem is, that:
a) I can not use Mutex, because in my application mutex is created with name + version.
Inno Setup doesn't know particular version of the previously installed programm.
b) I can not use something like IsModuleLoaded('myapp.exe'
there could be two different programms with same exe name, but in different folders.
And setup must allow to install to folder A, then the program from folder B\myapp.exe is running.
Any help would be highly appreciated!
P.S Sorry for my english
ASKER
That's certainly helpful. But if program changes title(and that's my case) during the work - this method won't be working :(
You can create additional mutex in your application. Mutex's name should be constant (without Version). Then you can use this mutex in the InnoSetup's script.
ASKER
If I create a mutex, it would be impossible to run two same programs from two different folders.
I am currently searching for a solution, which checks running processes and checks their execution path. So if inno setup installs to "program files/A"
I need to check if a process "prog.exe" exists and if it exists, if it's execution path is "program files/A".
I am currently searching for a solution, which checks running processes and checks their execution path. So if inno setup installs to "program files/A"
I need to check if a process "prog.exe" exists and if it exists, if it's execution path is "program files/A".
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hm.. That's also an option :) I'll consider that. Tnx
ASKER
Good solution.
Open in new window