07-07-2010 12:57 PM
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
Solved! Go to Solution.
07-07-2010 02:45 PM
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)
07-07-2010 03:51 PM
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
Here is the result in the Windows registry:
Woops, looks like I have an extra slash in there. Oh well, should work fine once I iron that out.
Cheers!
-Nic
07-07-2010 04:26 PM
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"). 😄
07-07-2010 04:40 PM - edited 07-07-2010 04:41 PM
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.