Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
5 rating:
 1.80 out of 5   

How Can I Add Multiple Support Files and Reproduce Directory Structure with the LabVIEW Application Builder?

Primary Software:
Primary Software Version: 8.5
Primary Software Fixed Version: N/A
Secondary Software: N/A

I am using LabVIEW Application Builder to create a program that will eventually be installed on multiple target machines. My application is very complex and requires a large number of external support files, all of which have to be installed in a directory structure that must be created on the target machine by the installer. I have previously used the Application Builder to add each file and set up the directories, but it is tedious to do so one file at a time. Do I have any other options for large installations?


LabVIEW 8.0 and Later

In LabVIEW 8.0 and later, the application builder utilizes the project explorer organization which allows any files or folders to be added to the project. Once these support files/folders are added to the project, to include them in the installer, go to the Installer Properties window and click on the Source Files category. On the right hand side, expand out My Computer in the project window and select the folder or file, then select the destination folder in which you would like it to be installed. Click the arrow to add this folder or file.  Now when the installer is built, these support files will be included.


LabVIEW 7.1 and Earlier

The simplest solution when using LabVIEW 7.1 and earlier to recreate a multiple file directory structure involves the utilization of a ZIP file. ZIP files have the ability to not only compress large numbers of files into a single, more easily managed file, but they also maintain directory information and will recreate the original directory structure on the target machine. Therefore, by simply zipping all of your files in their current directory structure, you can add a single support file (the resulting ZIP file) and simplify the process of creating your installer as well.

For a more refined and silent installation, a command-line unzip utility can be easily combined with a batch file to extract the support files and directory structure from your included ZIP file with little to no input from your end user. WinZip offers a command-line support add-on that works with WinZip 8.0, and it will work with the evaluation version.  Other free alternatives exist, such as 7-Zip.

The batch file that must be developed with this system can be relatively small depending upon your destination machine. If you decide to go with WinZip and its corresponding command-line utility, you must insure that both the main WinZip program and the utility are present on the target machine. If they are not, they will need to be included as individual support files. The application builder installer will then place the self-extracting executables in the locations you specify for use later.

Your batch file will have to perform the following operations:
  1. Execute the WinZip installer. Use the start command with the /w parameter to run this executable and wait for it to complete execution prior to making the next call.
  2. Execute the command-line utility uninstaller. Again, use the start and /w commands to run this executable.
  3. Relocate the command-line uninstall executable (wzunzip.exe in the case of the WinZip command-line utility) to a folder included in the system's PATH variable. In the case of Windows 9x/ME/XP, a good directory to use might be the C:\Windows directory. However, if your destination machines are Windows NT or 2000 the C:\WINNT directory is a viable choice. The system variable %windir% can be used instead, in place of the specific Widows directory path.  If you will have target machines from both categories, you will have to have two individual batch files.
  4. Execute the unzip utility. Depending upon your installation needs, you will need to pass a variety of parameters in this function. Consult the information provided by your zip utility provider for details on how to formulate this function.
Web-based search engines can provide several webpages detailing batch file development. Consult these for command-line parameter questions concerning the refinement of this process.

Related Links:
KnowledgeBase 2A6ECPG4: How Can I Include Other Installers with the Installer for My LabVIEW Application?
KnowledgeBase 149BHCQH: How Do I Make My LabVIEW-built Installer Run an Executable after Installation?
LabVIEW 8.5 Help: Building an Installer (Windows)


Report Date: 05/13/2002
Last Updated: 01/23/2010
Document ID: 2LC9APNK

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit