09-20-2010 07:10 AM
Hej,
I have an application in LV 2009, where I have created an installer. The installer installs to a directory called \Receiver relative to the Program Files directory. If I install this once to a computer, everything is OK.
However, I want to install the same application twice on the same computer. There should be no conflicts between the two applications, since I can configure them to work on different directories and ports. But if I call the installer again, and selects another directory, nothing is installed and I get the message "Installation Summary - No software will be installed or removed". It seems like the installer ignores that I have selected another directory, and just uses the default directory, relative to the Program Files directory.
Anyone knows the trick, how to install several instances on the same computer ?
BR, Jan
09-20-2010 07:15 AM
Hi Jan,
This is so because each installer has a GUID that is used to check whether the application needs to be upgraded or not. (It's a Microsoft function).
What you can do is create a new installer with a different GUID (copy the installer in the projects), and check witha text editor whether this GUID has changed.
But any specific reason you need two seperate installs? You can run the application twice with a specific INI token:
allowmultipleinstances=True
Ton
09-20-2010 07:40 AM
Hej Ton,
the reason I need two separate installs, is that the two instances have to work on different ports, and save files to different directories, which I set up in the application. I think that if I install the app. once but run it twice, there is no way to store the different parameter sets.
Could you please explain a little more about how to copy the installer? I have tried to duplicate the installer, but there is no GUID specified in the project under the installer, only under the builder which only occurs once even though I have now two installers.
BR, Jan
09-20-2010 08:00 AM
The GUID is not accessible directly in LabVIEW, it's stored in the LVPROJ file. With a text editor you can look it up. I think that a copy should alter the GUID.
But you could get the problem at the source and allow multiple configurations to be stored (or store them in a user selectable file).
Ton
09-20-2010 08:24 AM
Hej,
the problem with multiple configuration is that there is no user who can select anything - the apps are started automatically when the system powers up. So each instance must know where to look for configuration.
I actually looked in the project file with a text editor, but as I wrote, the GUID is not changed by duplicating the installer, so exactly what do you mean by "copy the installer in the projects" ?
Maybe the only solution is to create a new installer from ground manually, but I don't like having to change two projects each time I change anything.
09-20-2010 08:34 AM
Hi Jan,
you may move different configurations/data into different subdirectories. A parameter on the command line could direct the application to what subdirectory to look for. The advantage of this solution is that you only need one project and one installation.
Of course, this change may be a snap or a nightmare, depending on how your app was structured.
09-21-2010 07:24 AM
Options for launching several versions of the same executable with different behavior
If you would like more info on any of these methods, please ask. The first is probably the easiest to do, but also the least flexible.
09-23-2010 03:37 PM
Hej,
thanks a lot for all comments. I think I prefer the solution of using a parameter in the command line. Actually, I am already saving the complete configuration to a file, so I only need to send parameters -1, -2 and so on and then include _v1, _v2 etc. in the parameter files' names.
Just one question, do I need to do anything to enable the application to be run more than once ? Ton wrote:
"You can run the application twice with a specific INI token:
allowmultipleinstances=True"
but do I have to add this manually in the project file (and if yes: where), or can I set this up in the LV application builder ?
BR, Jan
09-24-2010 04:22 AM
You should try that, I don't know if that token is still valid in newer versions.
However what you should do, is create an ini-file with this explicit token, and in your build settings point to that ini file.
Ton