How Do I Make My LabVIEW-built Installer Run an Executable After Installation?
Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
Problem: I have built an installer using Application Builder, and I want to run a single executable after my installer completes. How do I do this?
Solution: This depends on the version of LabVIEW that you are using.
LabVIEW 8.xThere are three configuration steps to create an installer that will run an executable after it finishes.
- Add the executable to the project:
- Navigate to the Project Explorer window of the application.
- Right-click on My Computer, and select Add File.
- Browse to the desired executable for launching after the installer finishes, and click the Add File button.
The executable will now appear in the list under My Computer in the Project Explorer window.
- Include the executable in the installer:
- Right-click on Build Specifications in the Project Explorer window and select New ยป Installer.
- Select Source Files in the Category list on the left side.
- Expand My Computer in the Project View by left-clicking the plus sign.
- Left-click on the executable that appears in the expanded list, and verify in the Destination View that the selected destination is the project folder.
- Left-click on the blue arrow that is between the Project View and the Destination View to transfer the executable to the destination project folder.
Do not exit out of the Installer Properties window yet.
- Configure the installer to run the executable after installation is complete:
- Select Advanced in the Category List on the left side.
- In the Launch Executable After Installation portion of the Advanced dialog window, there are two buttons on the right side of the Executable file path display. Left-click on the Add Executable button.
- Select the executable from inside the project list, and click OK.
Notice that the executable path is now shown in the Executable window, and the Command Line Arguments display box is now available for entering commands.
If no further commands are necessary for the executable, then click
OK at the bottom of the Installer Properties window. The Project Explorer window will reappear with the installer listed underneath Build Specifications, and configuration would be complete. However, if you wish to send additional commands to the executable, use this display box to send such commands. For further information on how to use this feature, go to the index tab of the LabVIEW Help, and type "advanced page (installer)."
LabVIEW 5.0 - 7.1To run a single executable after your installer finishes, check the appropriate checkbox in the Advanced tab of the Application Builder (Create Distribution Kit in LabVIEW 5.0 and earlier). If you must run multiple executables after the installer completes you will need to use a batch file. Please see the "How Can I Include Other Installers with the Installer for My LabVIEW Application?" KnowledgeBase in the related links section below. Also be aware of the following:
- The executable must be included as part of the build. In other words, it must be installed by the main installer. It cannot be a separate piece distributed in parallel with the main installer.
- Specify the name of the executable by name only, not by path, in the Advanced tab. Since the executable you wish to run must be installed by the main installer, the main installer knows where to locate it, so no path is necessary.
- Pay attention to case sensitivity when specifying the name of the executable in the Advanced tab. In other words, match the case of each letter in the name of the executable.
Note: In order to have the executable run after installation, you must first add it as a Support File by clicking the Add Support File button on the Source Files tab. Then when you specify the file, by selecting "Run executable after installation", you simply specify the name of the file, not the path.
Related Links: KnowledgeBase 2A6ECPG4: How Can I Include Other Installers with the Installer for My LabVIEW Application?
LabVIEW Help: Advanced Page (Installer)
Attachments:
Report Date: 12/10/1997
Last Updated: 04/30/2007
Document ID: 149BHCQH