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 Bmyapp.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 updated code in the question is incorrect - you should never ever use Wow6432Node anywhere other than when looking at paths in RegEdit. From the behaviour you have described, you are actually looking for a 32-bit application. In this case you can use the same code regardless of whether.
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 Bmyapp.exe is running.
Any help would be highly appreciated!
P.S Sorry for my english
A XULRunner application has no installer by default; however, these instructions can help you to easily create a Windows installer with Inno Setup. The tutorial here uses the My App example from the article Getting started with XULRunner.
Step 1: Installing Inno Setup
Download Inno Setup from Inno Setup Downloads. If you only want to compile the installer, install the stable release. If you want to edit scripts, you should get the QuickStart Pack (which includes ISTool, the script editor. However, if you don't get the QuickStart Pack, you can later get ISTool from Inno Setup Third-Party Files.
Step 2: Creating the application
To make your application standalone, deploy your application according to the Deploying XULRunner 1.8 article. My App's example follows.
myapp/
application.ini
chrome/
default/
myapp.exe
(copyxulrunner-stub.exe
and rename)xulrunner/
Please test your application before deploying it. If your application does not run, neither will the installed version.
Step 3: Creating the Inno Setup script
Create an Inno Setup Script (.iss file). The Inno Setup Script Wizard can't set chrome directory's deployment point, so you have to edit the iss file yourself. Also you had better set the
AppName
and AppPublisher
properties to the same values specified in your XULRunner application's application.ini
file.My App's .iss file sample as follows:
Step 4: Building an installer
Once your script is ready, start the Inno Setup Compiler, load the script file, and compile it. This will create the compiler, which you need to test by actually trying to install your XULRunner application. Don't forget to then test the installed application to be sure the installation did indeed work correctly, since if you accidentally omitted resources from the script, they'll be missing from the installed package. If your application starts up successfully, your installer worked correctly.