09-19-2022 06:46 AM
Hello all,
After building my executable, I plan on building an installer so that all the necessary run-time drivers and VISA are installed when deployed on the target PC. I used to do all of it manually but figured it is probably the more efficient/smarter way to do it through an installer.
I have several questions regarding the installer:
1) If there are a few standalone .exe builds in the same project, how do I get one installer to install all the .exe builds? How do I define the different destination folders for each .exe? Some of them are independent of each other. Some can be called from the another .exe but also can be run on its own.
2) In the installer properties I just saw it's possible to write into the registry. If I want to write into the registry the following: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags] "IgnoreHWSerNum04D800DF"=hex:01
but the only folder available too write a registry in the HKEY_LOCAL_MACHINE is "Software", does that mean I can't access "System" through this installer property? How would I do this through an exe instead? Browsing through related forum questions, one of the suggestion was to run executable after installing finishes. Does this mean that it only run once ever, i.e. right after installation is complete? How do I write this vi and build this executable? (which brings me back to the first question)
Thank you in advance.
09-19-2022 01:51 PM - edited 09-19-2022 01:52 PM
For me I end up using a different installer then the one provided by NI. I've stuck with Inno Setup since it has been around for a while, is free, and has a decent amount of community support. Inno Setup makes installers that just put files in the places you tell it, makes icons, edit the registry, and do all kinds of normal installer like stuff.
What I end up doing is making an installer that is just the NI Runtime engine. And then I make a build of my EXE. Then I make an Inno Setup installer, that will first run the installer that installs the NI Runtime engine silently, then it puts my EXE where the user picks, then makes shortcuts to it. It is quite flexible. Making Inno Setup a little easier to use is ISTool.
You can get pretty advanced with it, adding all kinds of tools, with custom or full installs, and having it do things like auto select the runtime engine if a tool is used that needs it. NI's installers are great for the simplicity.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-19-2022 03:01 PM
@Hooovahh wrote:
For me I end up using a different installer then the one provided by NI. I've stuck with Inno Setup since it has been around for a while, is free, and has a decent amount of community support. Inno Setup makes installers that just put files in the places you tell it, makes icons, edit the registry, and do all kinds of normal installer like stuff.
What I end up doing is making an installer that is just the NI Runtime engine. And then I make a build of my EXE. Then I make an Inno Setup installer, that will first run the installer that installs the NI Runtime engine silently, then it puts my EXE where the user picks, then makes shortcuts to it. It is quite flexible. Making Inno Setup a little easier to use is ISTool.
You can get pretty advanced with it, adding all kinds of tools, with custom or full installs, and having it do things like auto select the runtime engine if a tool is used that needs it. NI's installers are great for the simplicity.
I think one of the goals of the exercise was to create an installer that auto-added the dependencies.
09-19-2022 03:42 PM - edited 09-19-2022 03:44 PM
@billko wrote:
I think one of the goals of the exercise was to create an installer that auto-added the dependencies.
If that is the case sorry I missed it. For me all I do is make an installer in the Application Builder, adding that EXE to it, then see what runtime engines were selected as part of the Application Builder auto dependency selector. I then make an installer for those runtime engines, but don't include the actual EXE. This way the installer from the Application Builder is really just the needed dependencies. Now if you do have say 5 different EXEs, and they have 5 different sets of dependencies for runtime engines, you can either make one installer that satisfies all 5 EXEs, and then install. Or you can make 5 different runtime installers and pick the right one for the selected EXEs. The issue with this is the final install file will balloon in size since it will have many duplicates for runtime files.
In any case you do have the downside of the runtime installer might need to be updated from time to time, as dependencies in those EXEs change. But in practice I don't think this changes very often, and you'll know you need something extra if you install it on a fresh machine and it doesn't run. I use a VM with snapshots for testing that.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-20-2022 02:05 AM
@Hooovahh wrote:
For me I end up using a different installer then the one provided by NI. I've stuck with Inno Setup since it has been around for a while, is free, and has a decent amount of community support. Inno Setup makes installers that just put files in the places you tell it, makes icons, edit the registry, and do all kinds of normal installer like stuff.
What I end up doing is making an installer that is just the NI Runtime engine. And then I make a build of my EXE. Then I make an Inno Setup installer, that will first run the installer that installs the NI Runtime engine silently, then it puts my EXE where the user picks, then makes shortcuts to it. It is quite flexible. Making Inno Setup a little easier to use is ISTool.
You can get pretty advanced with it, adding all kinds of tools, with custom or full installs, and having it do things like auto select the runtime engine if a tool is used that needs it. NI's installers are great for the simplicity.
I see. So basically it isn't possible from the NI standard installer. Your suggestion is a third-party software though, even if it's free, and I've been discouraged to use any of those unfortunately.
09-20-2022 11:05 AM
I just created a test project to test this idea.
There is nothing to prevent you add 2 exe's to the installer in the Source Files tab.
And I build the installer without problem.
To define different destination folders, you create the folders in the Destinations tab, then select the desired folder on the Source Files tab for your exes.
As for registry, I haven't test this, but I think you just right click the folder, and create new key. and new folder will show up in the tree.