IMPORTANT: This section contains steps that tell you how to modify the NI Package Manager database. However, serious problems might occur if you modify the database incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the database before you modify it. Then, you can restore the database if a problem occurs.
To resolve this error, follow these steps:
- Close NI Package Manager (NIPM).
- In order to have a backup, copy the following database file using Windows Explorer to some other folder: C:\ProgramData\National Instruments\NI Package Manager\Agents\file\installed.dat.
- Download the third-party tool DB Browser for SQLite. Choose the 64-bit Windows version and install it using the default options.
- If DB Browser is launched during the installation, close it.
- Go to the Windows Start Menu, find DB Browser, right-click on it, and choose Run as administrator. DB Browser must run as administrator because the NIPM database is in a secure directory that requires administrative privileges.
- In DB Browser, navigate to File » Open Database... and open the following file: C:\ProgramData\National Instruments\NI Package Manager\Agents\file\installed.dat.
- Click on the Browse Data tab, and in the Table dropdown, choose Package.
- Scroll through the rows, and look in the PackageName column to find the name of the failing package. For that row, copy the PackageKey identifier to the clipboard. You can also type in the Filter field below that column to narrow down the list. In the following example, row number 10 corresponds to the faulty "ni-foo" package.
- In the the Table dropdown, now choose CustomAction.
- In the Filter field under the PackageKey column, paste in the PackageKey identifier you copied in the above step.
- You will now only see the CustomExecutes for that package, and the FileName column has the executable name that it would run.
- Click on the number of the row to the left that has the problem, and click on the Delete Record button on the upper right. Here is an example for the 'ni-foo' package.
- Select File » Write Changes to save your changes, then exit DB Browser.
- Run NIPM again, choose the package you want to uninstall, and it should succeed because the CustomExecute is skipped.
If you realize that you edited the database incorrectly, then use Windows Explorer to restore the original "installed.dat" file from the file you backed up in the second step, and repeat the above procedure.