01-07-2015 04:55 AM
Hello,
I am working on a project that uses an external device.
I installed software for this device that includes drivers and libraries (.dlls) to be used with LabView.
To communicate with the device, I use the "create Active-X object" block.
As the Active-X input, I create a new input and pick the right class from the drop down list.
This does not add any dll files to the dependencies of the project.
LabView seems to be assuming that the necessary files are there.
I want to install this application on another computer that does not necessarilay have the software for the device installed.
My application fails. There's no error message of any missing library whatsoever.
I have to add the necessary libraries manually.
How should I do this?
1) I could add the library files to the project directly.
2) I could add the library files to the installer off my application, so that they are properly installed along with my application.
I'm not sure how to do this.
How do I tell the installer to install* the library files?
(* what I mean with that is to place them in the proper folder. Sure, the application folder is also searched for dlls upon execution but that means every application has its own dll, which seems to be a bad approach)
3) I could add the Redistributable .exe file to the installer of my application as an installer.
I'm not sure how to do this either.
Should I add the .exe file to the project, copy it to some location(which one?) during installation and then execute that file after the installer finished?
Or should I add this installer to the list of "additional installers"? It seems like one can only add NI installers. How do I add mine?
Or is there another way I should do this?
Thank you for your help.
Solved! Go to Solution.
01-07-2015 05:32 AM
If it's just a dll - you can add it to the project with 'always include' in your build specification.
If it's a dll with dependencies / drivers etc. then it would be better to run their installer to make sure everything is installed/registered properly as per their redistributable.
You can either tell the user to install the software as a prerequisite, show an error if it isn't installed when you launch the software and provide instructions on what to do (providing your code at least runs without it).
In your build specification you can specify an executable to run after the installer has completed so you could include the redistributable in your installer and specify it there.
01-07-2015 06:10 AM
I included the installer.exe in my installer by copying it to the desktop and executing it after installation.
This works.
It would be nice to automatically delete this temporary file afterwards.
Will this be the case if I copy it to [Temp] instead of [Desktop] ?
01-07-2015 07:03 AM
Nope, files in Temp are not automagically deleted by default. What you could do instead is either invoke the installer directly from your install media using a relative path or you could write a good 'ol batch file and invoke that instead at the end of your installer. This would start the actual driver installer and wait for it to finish. Then cleanup whatever needs to be cleaned up afterwards.