|| 4.19 out of 5
Automating Uninstallation of NI Software
NI Installers>>Installer Framework
Primary Software Version:
Primary Software Fixed Version:
How can I automate the uninstallation of National Instruments software?
Warning: To uninstall a specific product, you may need to use the flag /ForceDependents. However, this forces the uninstallation of all dependent products, which could include all NI software installed on your computer. For more information on this flag, please see below.
- Automated uninstallation does not require any user interaction, but will display a progress dialog.
- All reboots will be suppressed, and a return code will indicate if a reboot is necessary.
- The NI Uninstaller can be found in the NI Shared subdirectory, which is typically:
- 32- bit systems:
C:\Program Files\National Instruments\Shared\NIUninstaller\uninst.exe
- 64-bit systems:
C:\Program Files (x86)\National Instruments\Shared\NIUninstaller\uninst.exe
- However, you can find the exact location of
uninst.exe on your system from the registry keys:
- 32-bit Systems:
- 64-bit Systems:
To uninstall all NI software installed on the system:
uninst.exe /qb /x all
To uninstall specific NI software:
uninst.exe /qb /ForceDependents /x "product name"
- "product name" can be any combination of the following (however, if any product name doesn't match at least one product, then the uninstaller will fail):
- Name displayed in the Products column of the NI Uninstaller user interface:
- For a custom-built installer created with LabVIEW 8.0+, TestStand 3.5+, or CVI 8.0+, the name of the product displayed in Microsoft Add/Remove programs
- To uninstall multiple products, use multiple /x parameters, such as
uninst.exe /qb /ForceDependents /x “NI LabVIEW 8.0” /x “NI-DMM 2.5” The product name is case insensitive, and use quotes around product names that contain spaces.
- You can use multi-character ("*") and single-character ("?") wildcards for pattern matching in the product name. Note that it will remove all products if there are multiple matches found. For example, /x “NI LabVIEW Run-Time*” would remove 7.1 and 8.0 of the NI LabVIEW Run-time engine if both were installed.
- When using this command to uninstall a LabVIEW-built application, all software installed along with the LabVIEW-built application will be removed upon uninstallation. If there are remaining NI products installed and nothing depends on them, they will also be uninstalled.
The /ForceDependents flag is optional, though recommended, because it forces products that have a dependency on the specified product to also be uninstalled. If this flag is not specified, and the specified product is depended upon by another product, then the uninstall will fail without uninstalling any products.
For example, assume you have a system that has the LabVIEW 8.0 Run-time Engine and NI DAQmx 8.0 installed. You want to remove only the run-time engine, so you use the following command-line: uninst.exe /qb /x “NI LabVIEW Run-Time*”
In this scenario, the uninstall will fail and exit immediately, because DAQmx depends upon the LabVIEW Run-time engine. This same behavior occurs in the User Interface mode of the NI Uninstaller, when you are prompted to "Remove All" in the "Dependent Products Detected" dialog. Take advantage of the User Interface mode for discovering dependencies before using this flag to automate uninstallation on multiple computers.
To create a log of the uninstallation, use the /log logfilename.txt flag. Note that the log file can become very large.
||Successful uninstall. All products removed successfully.
||Successful uninstall. At least one product requested a reboot (the reboot is always suppressed).
|Any other positive integer
What Versions of NI Installers Support Automated Uninstallation?
The flag /qb /x all is supported if there is a product installed on your system that was shipped with NI Installers 2.0 or higher. The remaining flags were added with NI Installers version 2.6 or higher. To learn how to determine the version of your installer, see the related links below (the type is not important in this case). Alternatively, you can check the version of uninst.exe on your system instead of setup.exe on the media. The version of this file will reflect the latest version of NI Installers on your system.
KnowledgeBase 4CJDR18M: How Can I Determine the Type and Version of My National Instruments Installer?
KnowledgeBase 4CJDP38M: Automating the Installation of National Instruments Software External Link: MSDN: 32-bit and 64-bit Application Data in the Registry