- NSIS Discussion
- Device Driver Installation/Uninstallation
Archive: Device Driver Installation/Uninstallation
Theresias
16th June 2006 14:30 UTC
Device Driver Installation/Uninstallation
As described in the topic I need to install and uninstall a device driver with a software package. I did check wiki entries and other forum topics on that but none of these really helped to solve my problem.
So let's get more detailed...
We do have a software-first situation, which means the end-user needs to install the software before using the device, the device only works with the software. There are different hardware versions supported by our driver, but this also means more than one pair of VID/PID's. Due to the differences between 32-bit and 64-bit windows versions, we do have seperate drivers, so the installer needs to seperate here. There is no need to support old windows versions, 2000, 2003 and XP are fine, but it would be good to be ready for Vista.
I am quite familiar with NSIS, using it for quite some time now, but user installing the driver or actually not being ablt to install it cause more support than necessary - so this needs to be solved.
Looking forward to all your replies, thanks in advance.
CancerFace
16th June 2006 15:23 UTC
Could you provide more info on the driver itself? Do you have just a SYS or DRV file or is there an INF file as well? As for installing the driver, does the end user need to have admin rights?
The version checking is easy... Check this wiki page out for example.
CF
[Edit] You may also want to check this and this pages from MS ...
[Edit2] Or just browse this page :)
Theresias
16th June 2006 15:42 UTC
Originally posted by CancerFace
Could you provide more info on the driver itself? Do you have just a SYS or DRV file or is there an INF file as well?
It's a driver consisting of INF and SYS, which is a modfied version of the FTDIChip USB<>RS232 driver.
Originally posted by CancerFace
As for installing the driver, does the end user need to have admin rights?
Should not be necessary.
Originally posted by CancerFace
The version checking is easy... Check this wiki page out for example.
Allready been through this example, problem with this version check is, it doesn't determine if it's a 32-bit or 64-bit operating system - so doesn't help in this case.
Originally posted by CancerFace
[Edit] You may also want to check this and this pages from MS ...
[Edit2] Or just browse this page :)
Thanks, also been partly through these - my hope is that others already dealt with a similar situation instead of digging through all of this by myself.:(
I'm currently looking more detailed into the
InstDrv plug-in, but the 32/64-bit issue is still unsolved.
CancerFace
16th June 2006 15:51 UTC
Check this for an easy way to see if you are on a 64bit platform ... (or ask kichik who is probably around today :))
I was under the impression that if you have an INF/SYS combination then all you have to do in order to install the driver (if the hardware is PnP) is to copy the INF file over to $WINDIR\Inf and the SYS file to $SYSDIR\Drivers ...
Uninstalling may be a bit trickier because you would have to check if the SYS file is loaded first and then delete it.
I think I have seen something similar, I'll try to find more info.
CF
CancerFace
16th June 2006 16:16 UTC
Are you referring to these drivers? If yes, you can download the VCP/D2XX drivers provided on that site and use the DPInst.exe file (it is packed) which takes command line parameters. Invoke it with DPInst.exe /? to get an idea ... It looks like it supports loads of options, including silent install/uninstall of the driver
CF
[Edit] ... or get it directly from Microsoft
Theresias
16th June 2006 16:40 UTC
Yes, these FTDI drivers are the base of the drivers in question, but they have been modified, so just downloading does not work here.
The way using DPInst is IMHO not suitable. One would need different versions (x86, x64, IA64) for the different processor types, also there are "English" and "all languages/localized" versions available.
As usual with Microsoft applications, this would blow up our distribution to a size which is not acceptable. Some size examples...
DPInst.exe (x86, English) = 509 kB
DPInst.exe (x64, English) = 826 kB
DPInst.exe (IA64, English) = 1391 kB
So if you have an english only verson you end up with 2726 kB of addtional installer size.
DPInst.exe (x86, Localized) = 2848 kB
DPInst.exe (x64, Localized) = 3165 kB
DPInst.exe (IA64, Localized) = 3730 kB
For a localized (all languages) version you end up with 9743kB of addtional installer size.
For comparison reasons, our original distribution is below 2MB at the koment, which is still Ok for modem users. So blowing this up to 5 MB or even 12 MB is not acceptable.
Still, I apreciate your help you did help me quite a lot understanding the processes behind, but there must be a way to have a slim "NSIS" solution for this.
CancerFace
16th June 2006 16:52 UTC
Why would you need localized versions of DPInst.exe? If you plan to have your NSIS installer performing the (un)installation of the driver you can do it without showing a GUI. If you use the /S or /Q switch when you call DPInst then there is no reason to show anything to your user and you end up using just one version. I can see the problem though with the different architectures.
My suggestion would be to call API functions using the system plugin in order to install/uninstall the driver. Check the source code of the InstDrv plugin that you mentioned before for the appropriate API calls and write your code taking into account the different architectures that you are targeting ...
CF
Theresias
16th June 2006 16:58 UTC
Originally posted by CancerFace
Why would you need localized versions of DPInst.exe? If you plan to have your NSIS installer performing the (un)installation of the driver you can do it without showing a GUI. If you use the /S or /Q switch when you call DPInst then there is no reason to show anything to your user and you end up using just one version. I can see the problem though with the different architectures.
Yep, that way the english files would be enough, still 3 MB more. :down:
Originally posted by CancerFace
My suggestion would be to call API functions using the system plugin in order to install/uninstall the driver. Check the source code of the InstDrv plugin that you mentioned before for the appropriate API calls and write your code taking into account the different architectures that you are targeting ...
Yep, that seems to be the way to go - sadly nobody seems to have done something similar yet my hope was to find a ready-to-use solution here. :(
CancerFace
16th June 2006 17:04 UTC
... or you could start from the InstDrv plugin and add to it support for the architectures that you are after :)
CF
Theresias
16th June 2006 17:08 UTC
Originally posted by CancerFace
... or you could start from the InstDrv plugin and add to it support for the architectures that you are after :)
Yup, that's what I had in mind. Question is of course if this is possible without actually destroying the original architecture. We'll see...
Thanks for your help!