ps4000 library seems to require Admin rights

Post your .Net discussions here
Post Reply
nconrad
Newbie
Posts: 0
Joined: Sun Jan 21, 2018 8:24 pm

ps4000 library seems to require Admin rights

Post by nconrad »

Hi,

I'm trying to control a ps4262 from C# on a Windows 10 computer. I'm using the 64-bit SDK 10.6.12.41.

When using the ps4000.dll's OpenUnit() function, error 1 "PICO_MAX_UNITS_OPENED" is returned.

However, when I run the program with "Run as Administrator", it is able to control the ps4262.

How do I make my program run without admin rights? It should be possible, as the Picoscope6 application is able to connect without running it with administrator rights.

Thanks,

Nathan

Hitesh

Re: ps4000 library seems to require Admin rights

Post by Hitesh »

Hi Nathan,

Is your Windows operating system up to date with all updates and patches?

What are your UAC settings set to?

Regards,

nconrad
Newbie
Posts: 0
Joined: Sun Jan 21, 2018 8:24 pm

Re: ps4000 library seems to require Admin rights

Post by nconrad »

After posting, I ended up solving my issue (but couldn't immediately edit my question due to the forum's moderation policy).

In this case, I had not logged out and logged back into my account after installing PicoSDK. This caused the SDK's library path to not be in my environment's PATH variable. At the time, I didn't realize that a log-out and log-in (or restart) was required.

In order to link the ps4000.dll with my tool, I had manually copied the ps4000.dll into the same directory as my application. I think that either I would have needed to copy some other DLL, or the system must be setup to automatically elevate privileges when running the DLL in its default path and copying it with my user account removed the auto-elevation from the library.

After logging out (and removing ps4000.dll from my project's output directory), it no longer needed admin rights to run.

-Nathan

Hitesh

Re: ps4000 library seems to require Admin rights

Post by Hitesh »

Hi Nathan,

The ps4000.dll has a dependency on the picoipp.dll so if you are copying the ps4000.dll to another directory, then we would recommend that the picoipp.dll is copied alongside as well.

The need to log out and log back in again to refresh the PATH environment variable might depend on your User account settings. Did you use administrator privileges to install the PicoSDK?

Regards,

nconrad
Newbie
Posts: 0
Joined: Sun Jan 21, 2018 8:24 pm

Re: ps4000 library seems to require Admin rights

Post by nconrad »

Hitesh wrote:Hi Nathan,
Did you use administrator privileges to install the PicoSDK?
I was logged into my user account, but ran the program as Administrator (so it did have admin rights).

Anyway, it's resolved now. I'll write instructions to log out after installing the SDK in the install instructions for the software I'm working on.

-Nathan

June Liu
Newbie
Posts: 0
Joined: Thu Apr 12, 2018 1:27 pm

Re: ps4000 library seems to require Admin rights

Post by June Liu »

Hi, Nathan

could you tell me how to log out and log into my count, I have the same trouble with you, and I even got a "PICO_MAX_UNITS_OPENED" under Administrator.

thanks,
June Liu

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: ps4000 library seems to require Admin rights

Post by Martyn »

Which device do you have, and what O/S are you using ?

Have you downloaded and installed the SDK from our Download Page and are you trying to use the examples from our GitHub Page
Martyn
Technical Support Manager

Post Reply