Go Down

Topic: Automatically Pre-installing Drivers for Non Administrators (Read 13186 times) previous topic - next topic

fssrepack

Hi,

Systems: Windows XP/7 32-bit.

I am trying to get the Arduino UNO drivers pre-installed in a student environment so that students can come along, plug in the boards and start programming them without needing Administrator rights.

Easy enough you may say, just plug in the board while logged in as an admin, install the drivers, done. Problem is I need to automate it - we have too many computers for it to be done one at a time.

I've tried using the Device Driver handling techniques in InstallShield (which uses DIFx), but that doesn't even seem to install anything. I've tried scripting it using the default Windows command lines such as:
  rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 "Arduino UNO.inf"
But that still prompts the students for the admin account details when they plug the board in. I've also tried substituting "DefaultInstall" with "DriverInstall" due to the wording of the inf file, but achieved the same result.

Has anyone successfully done this in a similar environment? It would be nice if the drivers were supplied separately somewhere with an installer which could be run silently.

Thanks for any suggestions,

Matt

ElliottW

I'm trying to do the same thing (Though I've been trying to use a WiX installer) with about the same luck. If anyone from Arduino or anyone that has driver experience can tell us if it's possible, and possibly what's going wrong, that would be great!

The command line I was using btw:
"rundll32.exe" advpack.dll,LaunchINFSectionEx "Arduino UNO.inf",DriverInstall.NTamd64,,4,N

This would ask me to locate usbser.sys (Which is the system file the Arduino inf depends on).

Thanks,
Elliott

fssrepack

Hi Elliott,

Since posting I have had some luck with the drivers. In the end I had to run Repackager to capture the driver installation and device connection to see what changes were made.

Obviously the inf file goes to C:\Windows\Inf and the usbser.sys file to C:\Windows\System32\drivers, but all the important stuff happens in the registry. I've exported the relevant reg information from my installer and included it below. I hope this proves useful to you.

Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbser]
"DisplayName"="USB RS-232 Emulation Driver"
"Type"=dword:00000001
"ImagePath"=hex(2):73,79,73,74,65,6D,33,32,5C,44,52,49,56,45,52,53,5C,75,73,\
62,73,65,72,2E,73,79,73,00
"ErrorControl"=dword:00000001
"Start"=dword:00000003

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbser\Enum]
"NextInstance"=dword:00000001
"Count"=dword:00000001
"0"="USB\\Vid_2341&Pid_0001\\649353432333512161C1"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\usbser\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9C,00,00,00,14,00,00,00,30,00,00,00,\
02,00,1C,00,01,00,00,00,02,80,14,00,FF,01,0F,00,01,01,00,00,00,00,00,01,00,\
00,00,00,02,00,60,00,04,00,00,00,00,00,14,00,FD,01,02,00,01,01,00,00,00,00,\
00,05,12,00,00,00,00,00,18,00,FF,01,0F,00,01,02,00,00,00,00,00,05,20,00,00,\
00,20,02,00,00,00,00,14,00,8D,01,02,00,01,01,00,00,00,00,00,05,0B,00,00,00,\
00,00,18,00,FD,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,\
01,00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\UsbFlags\234100010001]
"osvc"=hex:00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E978-E325-11CE-BFC1-08002BE10318}]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E978-E325-11CE-BFC1-08002BE10318}\0004]
"ProviderName"="http://www.arduino.cc"
"NTMPDriver"="usbser.sys"
"MatchingDeviceId"="usb\\vid_2341&pid_0001"
"InfSectionExt"=".NT"
"InfSection"="DriverInstall"
"InfPath"="arduinouno.inf"
"EnumPropPages32"="MsPorts.dll,SerialPortPropPageProvider"
"DriverVersion"="5.1.2600.0"
"DriverDesc"="Communications Port"
"DriverDateData"=hex:00,80,0c,77,1a,27,c8,01
"DriverDate"="11-15-2007"
"DevLoader"="*ntkern"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{a5dcbf10-6530-11d2-901f-00c04fb951ed}]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{a5dcbf10-6530-11d2-901f-00c04fb951ed}\##?#USB#Vid_2341&Pid_0001#649353432333512161C1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}]
"DeviceInstance"="USB\\Vid_2341&Pid_0001\\649353432333512161C1"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{a5dcbf10-6530-11d2-901f-00c04fb951ed}\##?#USB#Vid_2341&Pid_0001#649353432333512161C1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}\#]
"SymbolicLink"="\\\\?\\USB#VID_2341&PID_0001#649353432333512161C1#{A5DCBF10-6530-11D2-901F-00C04FB951ED}"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{a5dcbf10-6530-11d2-901f-00c04fb951ed}\##?#USB#Vid_2341&Pid_0001#649353432333512161C1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}\#\Control]
"Linked"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceClasses\{a5dcbf10-6530-11d2-901f-00c04fb951ed}\##?#USB#Vid_2341&Pid_0001#649353432333512161C1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}\Control]
"ReferenceCount"=dword:00000001

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_2341&Pid_0001]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_2341&Pid_0001\649353432333512161C1]
"Capabilities"=dword:00000094
"Class"="Ports"
"ClassGUID"="{4D36E978-E325-11CE-BFC1-08002BE10318}"
"CompatibleIDs"="[~]USB\\Class_02&SubClass_02&Prot_01[~]USB\\Class_02&SubClass_02[~]USB\\Class_02[~]"
"ConfigFlags"=dword:00000000
"DeviceDesc"="Communications Port"
"Driver"="{4D36E978-E325-11CE-BFC1-08002BE10318}\\0004"
"FriendlyName"="Communications Port (COM4)"
"HardwareID"="[~]USB\\Vid_2341&Pid_0001&Rev_0001[~]USB\\Vid_2341&Pid_0001[~]"
"LocationInformation"="Arduino Uno"
"Mfg"="http://www.arduino.cc"
"Service"="usbser"
"UINumber"=dword:00000000

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_2341&Pid_0001\649353432333512161C1\Control]
"ActiveService"="usbser"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_2341&Pid_0001\649353432333512161C1\LogConf]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_2341&Pid_0001\649353432333512161C1\Device Parameters]
"ExtPropDescSemaphore"=dword:00000001
"ForceFifoEnable"=dword:00000001
"PollingPeriod"=dword:00000000
"PortName"="COM4"
"RxFIFO"=dword:0000000E
"SymbolicName"="\\??\\USB#Vid_2341&Pid_0001#649353432333512161C1#{a5dcbf10-6530-11d2-901f-00c04fb951ed}"
"TxFIFO"=dword:00000010

perhof

It would also have been possible to use dpinst.exe to silently preinstall the drivers as part of a system build. Unfortunately the drivers aren't signed so they will not install silently that way.
It's possible to sign the drivers yourself using a self-signed certificate but then you would have to install a root certificate on your clients first and that can normally not be installed silently either.

I can think of a couple of ways to solve the certificate problem but there may be more ways:
If you have an Active Directory you can distribute the self-signed certificate using a Group Policy.
If you have an internal Certification Authority you can sign the drivers with a certificate from your own CA.
This forum is probably not the right place to find the solution.

The best thing would be if the Arduino team would sign their drivers using real certificates.
They would need to do that soon if they want to support Windows 8 anyway.

fssrepack


The best thing would be if the Arduino team would sign their drivers using real certificates.
They would need to do that soon if they want to support Windows 8 anyway.


^this please!


perhof


Costs money. Who pays?


You, me and everyone else that are paying money for their products perhaps?

dxw00d

So prices go up. People are already successfully using Arduinos on Windows 8, without signed certificates. I don't want want to pay for a certificate for Windows users, when I don't use it myself.

eried

Maybe it is possible to make Arduino to fake a signed device hacking the 8u2 firmware? It is illegal probably but it should be possible to simulate another vendor ID and stuff
My website: http://ried.cl

perhof


So prices go up. People are already successfully using Arduinos on Windows 8, without signed certificates. I don't want want to pay for a certificate for Windows users, when I don't use it myself.


I wouldn't call it successfully since you have to modify either your system or the drivers to be able to install them.
I see what you mean with not having to pay for drivers you don't need though.

I don't use the Windows drivers either but I still think they should be signed.

ElliottW

Thanks for the replies everyone. I was looking at DPInst and trying to figure out if I have everything I need to make that work. Can that work with just the inf from the Arduino installation? On that note...

Matt, are you redistributing usbser.sys? I've read that Microsoft strongly suggests not to do this and instead to reference mdmcpq.inf (Which the Arduino inf's do), and to use it's FakeModemCopyFilesSection directive (Which the Arduino inf's don't). Has this caused any problems for you? (Here's the Microsoft article http://support.microsoft.com/kb/837637)

With the Registry information you posted, are you setting that up manually in your installer? And do you get a completely silent install the way you're doing it? It seems that using DPInst, that isn't going to happen without signing the driver.

Thanks again everyone,
Elliott

ElliottW

Okay, tried DPInst and that seems to work, as long as you're happy having a big red "Are you sure" box pop up for every inf! It was as easy as copying DPInst into the driver folder and running "dpinst.exe /LM"

Still hoping there's a quieter way (That doesn't involve signing Arduino's drivers).

-Elliott

simplesi


..
Obviously the inf file goes to C:\Windows\Inf
...


I'm trying to do get the drivers install in all computers in my schools
What .inf file should go into c:\windows\inf

I've got one machine setup manually but I can't work out what the relevant .inf file is :(

Simon

ElliottW

Hello Simon,

With the newer Arduino drivers you should really use dpinst.exe (This is a windows program that handles installing the driver).

Here's how you can do that:


  • Download the zip file for the Arduino IDE (This can be 1.0.5 or 1.5.6)

  • Inside the zip file there's a "drivers" directory. Extract this from the zip file.

  • The important files are: arduino.inf, arduino.cat, and the two dpinst files. If you're on a 32 bit OS you want dpinst-x86.exe. If you're on a 64 bit OS you want dpinst-amd64.exe. If you're going to be doing this on a lot of computers: copy the inf, cat, and the appropriate dpinst to a flash drive or something similar.



To install the driver just double click on dpinst. As long as arduino.inf and arduino.cat are the only inf and cat files in the same directory, it will install the drivers automatically. If you wanted to run this without the dpinst wizard popping up, you could create a batch file with the command "dpinst-x86.exe /SW" (or dpinst-amd64 if that's the one you need). The /SW flag means "Suppress Wizard".

-Elliott

simplesi

:)

Thanks

I "REALLY" hope that this works as I had a right to-do with drivers today!
http://cymplecy.wordpress.com/2014/06/16/arduino-class-set-in-year-6/

I'll be trying this in tomorrows school :)

Simon

Go Up