LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to install several instances of the same application on a computer?

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

Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 1 of 9
(3,640 Views)

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

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 9
(3,636 Views)

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

Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 3 of 9
(3,619 Views)

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

 

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 9
(3,611 Views)

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.

Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 5 of 9
(3,597 Views)

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.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 9
(3,585 Views)

Options for launching several versions of the same executable with different behavior

 

  1. Command line options - already mentioned above
  2. Use separate launchers which pass different info to the same main program.
  3. Launch instances of the same executable in the same runtime, but use a functional global for reference counting so you can pull different parameters from a persistent store (e.g. INI file).

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.

 

0 Kudos
Message 7 of 9
(3,555 Views)

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

Jan Nielsen
Freelance system analyst and LabVIEW programmer
0 Kudos
Message 8 of 9
(3,503 Views)

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

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 9 of 9
(3,473 Views)