NI Package Manager (NIPM)

cancel
Showing results for 
Search instead for 
Did you mean: 

Permissions issue with SQLite databases when removing my package

Solved!
Go to solution

Hi folks,

 

I'm working with NIPM to streamline installation and removal of code deployments for production test.

 

The version I am using is 19.5.1f1

 

I'm running the following:

 

c:\Program Files\National Instruments\NI Package Manager>nipkg remove foo-lv17-ts17-new-station-setup -y --verbose
The following packages will be removed:
 foo-lv17-ts17-new-station-setup (1.0.0)
Installing 0 package(s); Upgrading 0 package(s); Removing 1 package(s); Downgrading 0 package(s)
Need to get 0 bytes of archives.
After this operation, 0 bytes of additional disk space will be used.
Error -125090: A plugin returned one or more errors at the beginning of the transaction.

Additional error information:
Error -125522: There was a problem with calling to the database of installed packages (SQL function call 'sqlite3_prepare_v2' returned error code 14 with error message 'unable to open database file'). Note: In order to perform the current operation, you might need to run nipkg.exe as Administrator.
Error -125522: There was a problem with calling to the database of installed packages (SQL function call 'sqlite3_prepare_v2' returned error code 14 with error message 'unable to open database file'). Note: In order to perform the current operation, you might need to run nipkg.exe as Administrator.

After some troubleshooting I've determined that the file system is denying access to 

C:\ProgramData\National Instruments\NI Package Manager\Agents\wininst\installed.dat-wal

C:\ProgramData\National Instruments\NI Package Manager\Agents\file\installed.dat-wal

 

I can copy the SQLite files out of those directories and access them without issue, but unfortunately the directory is locked down for write access. Elevated privileges are a strict no-go for our production environment, unfortunately.

 

I'm seeing this Idea Exchange thread but it doesn't seem to have reached this particular use case.

Is there any workaround so that I can automate our deployment with this?

 

Thanks,

 

Mr. Jim

 

0 Kudos
Message 1 of 9
(5,440 Views)

Hi Jim,

Just to rule out the obvious: did you run the command from a Command Prompt running as Administrator? Notice that the error message hints about this at the end:

Error -125522: There was a problem with calling to the database of installed packages (SQL function call 'sqlite3_prepare_v2' returned error code 14 with error message 'unable to open database file'). Note: In order to perform the current operation, you might need to run nipkg.exe as Administrator.

NIPM operations always require Administrator privileges.

__________________
Daniel Jaramillo
National Instruments
0 Kudos
Message 2 of 9
(5,420 Views)

Hi Daniel and thanks for the reply.

 

This is rather embarrassing, but our IT department has locked down admin command line rights without opening a ticket. (Even on my development PC)

 

Unfortunately I can't test this, and I'm pretty sure it would work.

That's not really my point, though - I want to run the command line as a standard user on test station out at a contract manufacturer. I want to be able to automate installation and uninstallation of packages all day long as operators change tests and/or retool stations at will.

0 Kudos
Message 3 of 9
(5,415 Views)

Oh I just noticed this part in your post I missed originally:


Elevated privileges are a strict no-go for our production environment, unfortunately.  

Because NIPM installs/uninstalls software Administrator / elevated privileges are REQUIRED. Unfortunately there is no way around this.

__________________
Daniel Jaramillo
National Instruments
0 Kudos
Message 4 of 9
(5,414 Views)

Thanks Daniel.

 

Since there is no workaround, is NIPM no longer a good fit for our production environment?

(Sadly SystemLink is not an option for us due to budgetary scrutiny.)

 

I'm sitting right on the threshold of either using this for 200+ stations or walking away from it.

I really truly am excited to use it if it's viable for us.

 

PS I don't want to actually run the installer agent, which I completely understand needs elevated privileges. I want to use the file agent to distribute code.

 

Thanks again,

 

Mr. Jim

 

0 Kudos
Message 5 of 9
(5,400 Views)
Solution
Accepted by topic author Mr._Jim

@Mr._Jim wrote:

 

That's not really my point, though - I want to run the command line as a standard user on test station out at a contract manufacturer. I want to be able to automate installation and uninstallation of packages all day long as operators change tests and/or retool stations at will.


Our team has looked into this in the past but that functionality has not gotten high enough prioritization to be supported. I would suggest you post your use case at the Package Manager Idea Exchange forum to see what other customers feel about it and help us prioritize it accordingly. Thanks!

__________________
Daniel Jaramillo
National Instruments
Message 6 of 9
(5,396 Views)

Hi Mr. Jim,

 

As Daniel mentioned, currently NIPM requires elevated privileges when installing packages. I would be interested in learning more about your specific use case to see if there is anything we can do to help. As you mentioned, SystemLink may be the best solution for your scenario, but perhaps we can find an alternative. I will send you a private message to discuss more details.

 

Thanks.

Aaron Peña

Product Owner, Package and License Management

National Instruments

Message 7 of 9
(5,391 Views)

Thanks Daniel. Not the answer I had hoped for, but I do appreciate your time and the honest answer. Smiley Wink

Message 8 of 9
(5,388 Views)

Awesome - thanks Aaron! I'll check my inbox.

0 Kudos
Message 9 of 9
(5,382 Views)