Automating Uninstallation of NI Software

Updated May 1, 2018

Reported In


  • LabVIEW Full

Operating System

  • Windows

Issue Details

How can I automate the uninstallation of National Instruments software in Windows Operating System?


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: HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\Common\Installer\MIF\MetaUninstaller\Path
    • 64-bit Systems: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\National Instruments\Common\Installer\MIF\MetaUninstaller\Path 
Uninstaller Modes: 
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. 

Error Codes 
0ERROR_SUCCESSSuccessful uninstall.All products removed successfully.
3010ERROR_SUCCESS_REBOOT_REQUIREDSuccessful uninstall. At least one product requested a reboot (the reboot is always suppressed).
Any other positive integerFAILUREUninstall failed.

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.


Not Helpful