From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Combine 3rd party installer and LabVIEW-generated installer?

Solved!
Go to solution

I am developing a software that controls a thermal controller via USB cable connection. I use NI-VISA to communicate with it. The controller uses a USB chip, for which a 3rd party USB driver is required. (I downloaded it from here: http://www.ftdichip.com/Drivers/D2XX.htm

 

Now the software is complete, I built the application successfully. In my installer, I am hoping to include the 3rd party USB driver so single installer does it all, instead of running 2 installers.

LabVIEW's installer build specification property dialog seems to only support NI drivers. Is there a way to include the USB driver in my installer?

 

Thank you in advance

 

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 1 of 4
(3,520 Views)

Hi, I made some research on this today. If I am correct, there are 3 ways to install the driver that I am interested in. I would like to know if anyone can direct me to the right direction.

 

The 1st way is simple. Use the installer executable provided by the website. But I do not know the best way to include that into my LabVIEW App Installer.

 

The 2nd way is to use contents of the zip file provided by the website, and use Installer Build Specification to copy those files into the appropriate directories. The zip file contains INF, SYS, DLL files etc (see below image). If it takes only moving files, then LabVIEW's Installer must be able to do it easily, so I would like to go with this direction. Problem is I do not know the correct way to do it. Also, if this approach is the way to go, what is the way to uninstall the driver when a user chooses to uninstall the application itself?

 

The 3rd way may be to run the RUNDLL32.EXE after installation. I could create a VI that calls it via System Exec to run "RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.inf" as described in this page

 

 

Thank you in advance

Zip Loc.JPG


Zip File Content.JPG

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 2 of 4
(3,481 Views)
Solution
Accepted by topic author TailOfGon

@TailOfGon wrote:

The 1st way is simple. Use the installer executable provided by the website. But I do not know the best way to include that into my LabVIEW App Installer.


It's unclear if you're aware of this, but you can configure the installer to include executable files and then run the file at the end of the installation. It should be in the Advanced page of the build settings.

 

Also, there are 3rd party installer programs like Inno Setup, which have more options, and which you could use to wrap both installers. I haven't used any of those, but I know of others who do prefer them.


___________________
Try to take over the world!
Message 3 of 4
(3,457 Views)
Solution
Accepted by topic author TailOfGon

Your option 1 ist probably the easiest and as tst pointed out, you can run a single command at the end of the Application Installer. That can be the installer for your driver, or if you need more complex additional installations you can also call a batch command file that does all the work. The advantage of this is that that command is executed with the same credentials as your application installation which usually happens with elevated admin rights, since installing into Program Files does require that, and installing something like your driver installer almost certainly will need that too.

 

Option 2 is complicated and with the possibilities of the NI Installer probably hard to do. Not only have you to figure out what files you need to put where but you also have to call the service manager to install the kernel driver part of that driver. The service manager also has a command line interface so you can do it without using Windows API calls but it is a tedious process to do, especially if you don't know about what a Windows kernel driver is and how it relates to the Windows system and what is needed to properly install it.

 

Option 3 has the disadvantage that it only executes in the context of your application, which is typically not running with elevated rights, so the installer for the device driver will at least require an extra elevation dialog prompt, but unless the installer has an explicit manifest embedded which tells Windows that this is required it will simply fail and calling an external process with elevation prompt yourself is a bit tricky.

Rolf Kalbermatter
My Blog
Message 4 of 4
(3,452 Views)