LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Installed path for registry settings for Installer

Solved!
Go to solution

Hi!

 

I want my installer to add some registry keys to the Windows registry.  The value of these registry keys is dependent on what the user picks as their install path during the installation of my software.  Does anyone know if there is some variable that represents the install path like %install path% or something?

 

I'm using LabVIEW 2009 SP1.

 

Let me know if you need any more information!

 

I suppose if there isn't a solution, I can add code to my program to create these registry keys after the program has been installed.

 

Thanks!

-Nic

0 Kudos
Message 1 of 5
(2,747 Views)
Solution
Accepted by topic author NicLinley

I solved this solution by running a little "setup wizard" application (written in LV) that gets run when the installer completes. To set this, make sure to include your built setup wizard app with the installer, and then there's a setting in the installer's advanced options to specify an application to run when the installer completes. You can also pass command line parameters to the program, and these include [INSTALLDIR] for the installed destination (e.g. C:\Program Files\...) and [DISTROOT] for the folder containing setup.exe (e.g. D:\).

 

I couldn't see any reference for these guys in the Registry options help, but if they work there as well, that's definitely worth knowing 🙂

(although for the app I'm talking about, the setup wizard did a lot more besides writing registry values, including checking/installing 3rd party drivers and .NET)

Message 2 of 5
(2,737 Views)

Hi shew82!

 

I didn't need to make a "setup wizard" application that ran after my installer completed.  Your post contained the information that I needed and it worked like a champ, so I'm marking your post as the solution.  Thank you very much.

 

Turns out [INSTALLDIR] can be placed in the registry settings of a LabVIEW installer for your LabVIEW application.

 

See below

 

18317iD0019D305C6A2E58

 

Here is the result in the Windows registry:

18319i4BED3CC25FCEF8BB

 

Woops, looks like I have an extra slash in there.  Oh well, should work fine once I iron that out.

 

Cheers!

-Nic

Message 3 of 5
(2,729 Views)

Nice - I had always wondered if those fields would work there as well (as there was no mention in the LV help), but never had the time to experiment (installer building +testing takes way too much time to try something for the "fun of it"). 😄

0 Kudos
Message 4 of 5
(2,721 Views)

The LabVIEW help page that comes up when you click the "Help" button on the screen in the screenshot above does say:

 

 


 

Registry Page (Installer Properties Dialog Box)

Refer to the Microsoft Web site for more information about Microsoft Installer (MSI) registry keys and value data types.

 


Which, I'm sure somewhere on the Microsoft Web site it specifies [INSTALLDIR] as a variable to be used with MSI style installers.... good luck finding it though.  It would be more helpful if NI had a table or list of common variables that a developer might find useful.  Maybe they do somewhere, and I just missed it.  It wouldn't be the first time.

 

Message 5 of 5
(2,716 Views)