How to distribute drivers?

Post general discussions on using our drivers to write your own software here
Post Reply
Ben321
User
User
Posts: 6
Joined: Tue May 23, 2017 8:09 am

How to distribute drivers?

Post by Ben321 »

Ok, so if I write a program with the SDK and then distribute my program, I will obviously need to distribute the DLL file for the hardware in question, as it contains functions called by my program. However, the DLL is only an interface to the actual kernel-mode driver that controls the hardware. The DLL file is not itself the driver. The driver a SYS file, and Windows requires special installation procedures for a driver. I can have them download a copy of the SDK installer or the PicoScope6 installer, as these both install the drivers (if I remember correctly), but neither of these is a standalone driver installer, and installs stuff that the end-user of my program wouldn't need (such as a complete copy of the SDK, or a complete copy of PicoScope6).

What is the best way to distribute the driver with my program, so that the end-user can easily install just the driver (and not install PicoScope6 or the full SDK)?

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

Re: How to distribute drivers?

Post by Martyn »

As you have said you will need dll files from C:\Program Files\Pico Technology\SDK\lib, specifically

psxxxxx.dll
psxxxxxWrap.dll
picoipp.dll

and the driver files from

C:\Program Files\Pico Technology\SDK\sys

to match the O/S version of the system you are installing on, not the application.
Martyn
Technical Support Manager

Ben321
User
User
Posts: 6
Joined: Tue May 23, 2017 8:09 am

Re: How to distribute drivers?

Post by Ben321 »

Martyn wrote:As you have said you will need dll files from C:\Program Files\Pico Technology\SDK\lib, specifically

psxxxxx.dll
psxxxxxWrap.dll
picoipp.dll

and the driver files from

C:\Program Files\Pico Technology\SDK\sys

to match the O/S version of the system you are installing on, not the application.

When I create the installer, what should I set for the destination folder for the DLL files, and what should I set for the destination for the driver files? Should I just set them to all be placed in the c:\windows\system32 folder?

And what about registering the driver files? That is, what registry entries should my installer write? From my understanding, all device drivers in Windows require a registry entry, so that the system knows that the driver is present, and able to be used, and also know what device (based on hardware ID stored in the registry) the specific driver file is designed to work with.

I've never created a driver installer before, for any device. So I need to be walked through the process.

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

Re: How to distribute drivers?

Post by Martyn »

For the drivers you just need to run dpinst.exe which is included in the system folder. This is the Microsoft Driver Package Installer and will put things where they need to be, and register the drivers.

The dll's need to be where your application is expecting them, generally with the exe you create.
Martyn
Technical Support Manager

Ben321
User
User
Posts: 6
Joined: Tue May 23, 2017 8:09 am

Re: How to distribute drivers?

Post by Ben321 »

Martyn wrote:For the drivers you just need to run dpinst.exe which is included in the system folder. This is the Microsoft Driver Package Installer and will put things where they need to be, and register the drivers.

The dll's need to be where your application is expecting them, generally with the exe you create.
Dpinst.exe is the driver installer that comes with Windows then? So if it is part of Windows, when it is run, it needs to be instructed as to which driver to install. How do I point it to Picoscope driver to install? Do I need to write some kind of installation script for it?

As for the DLLs, what is the purpose for each DLL? My scope (and the one I'm writing the program for) is the PS 2204A. I see there's ps2000.dll, ps2000a.dll, ps2000Wrap.dll, and ps2000aWrap.dll. Which of these do I need. I know that my scope is considered to be a 2000 series unit, but it has an "a" on the end of the model number (instead of having no letter at the end, that is the model is 2204A, not 2204), so I'm not sure if it's actually a 2000 series unit or a 2000a series unit. And also what is the Wrap DLL for? I never used it in the program I wrote. I just used the plain ps2000.dll. And then you also listed the picoipp.dll file. So I'm not sure if I will only need 3 DLL files like you showed, or 5 DLL files (counting the ones for the "2000a" units).

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

Re: How to distribute drivers?

Post by Martyn »

For the 2204a, which is a ps2000 unit not a ps2000a, the minimum required dll's are

ps2000.dll
and
picoipp.dll which is used by ps2000.dll

You only need ps2000Wrap.dll if your application uses it, it is needed to provide some functionality for certain programming languages that can't work with CallBacks.

For the sys drivers you just need all the files in the appropriate folder (x86 or x64), the dpinst application is included in the folder. If you run dpinst within the folder it will do the rest.
Martyn
Technical Support Manager

Ben321
User
User
Posts: 6
Joined: Tue May 23, 2017 8:09 am

Re: How to distribute drivers?

Post by Ben321 »

Martyn wrote:For the 2204a, which is a ps2000 unit not a ps2000a, the minimum required dll's are

ps2000.dll
and
picoipp.dll which is used by ps2000.dll

You only need ps2000Wrap.dll if your application uses it, it is needed to provide some functionality for certain programming languages that can't work with CallBacks.

For the sys drivers you just need all the files in the appropriate folder (x86 or x64), the dpinst application is included in the folder. If you run dpinst within the folder it will do the rest.
Thank you for the info.

Post Reply