Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: fssrepack on Jan 11, 2012, 11:31 am

Title: Automatically Pre-installing Drivers for Non Administrators
Post by: fssrepack on Jan 11, 2012, 11:31 am
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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: ElliottW on Aug 28, 2012, 01:39 am
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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: fssrepack on Aug 28, 2012, 09:36 am
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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: perhof on Aug 28, 2012, 11:25 am
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.
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: fssrepack on Aug 28, 2012, 11:35 am

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!
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: dxw00d on Aug 28, 2012, 11:49 am
Costs money. Who pays?
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: perhof on Aug 28, 2012, 11:51 am

Costs money. Who pays?


You, me and everyone else that are paying money for their products perhaps?
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: dxw00d on Aug 28, 2012, 12:06 pm
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.
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: eried on Aug 28, 2012, 01:04 pm
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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: perhof on Aug 28, 2012, 01:38 pm

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.
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: ElliottW on Aug 28, 2012, 06:52 pm
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 (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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: ElliottW on Aug 28, 2012, 07:41 pm
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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: simplesi on Jun 16, 2014, 03:34 pm

..
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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: ElliottW on Jun 16, 2014, 08:30 pm
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:



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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: simplesi on Jun 16, 2014, 08:33 pm
:)

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
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: terryking228 on Jul 01, 2014, 10:40 pm
Hmmm. Latest look at Arduino Downloads:
---------------------( COPY )---------------------
Arduino 1.5.6-r2 (release notes):
Windows Installer, Windows ZIP file (for non-administrator install)
-----------------( END COPY )----------------------

IsThere a specific "non-administrator install" procedure??

Thanks!
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: ElliottW on Jul 01, 2014, 11:02 pm
Hello Terry,

The zip file would indeed let you run the IDE without installing it first. However, as far as I know, there's still no way to install drivers without administrator privileges.

Elliott
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: terryking228 on Jul 01, 2014, 11:53 pm
Hi Elliot,

THANKS! I was afraid of that...  Skool IT seems universally fearful. Wish we could get a couple of testimonials from big school IT that "Arduino FTDI Drivers are No Problem"..   Anyone have suggestions?

I have this on the ArduinoInfo.Info site:
---------------------( COPY )---------------------
WINDOWS XP - 7 - 8 INSTALL PROBLEMS:

Windows 7 / 8 may not see the Yourduino or Arduino board when you first plug it in.

You must install the USB serial port drivers. Download and install the Virtual COM Port Driver from this web site: http://www.ftdichip.com/Drivers/VCP.htm

The easiest way may be to get their Setup executable that can load the drivers here:
http://www.ftdichip.com/Drivers/CDM/CDM%20v2.10.00%20WHQL%20Certified.exe
This is an executable program that loads the drivers. It SHOULD work for Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2 and Windows 8/8.1.

You can check that the drivers have been installed. Plug in your Arduino/Yourduino and then open the Windows Device Manager (Control Panel > All Control Panel Items > Device Manager). Look for a "USB Serial Port" in the Ports section; that's the Arduino board.
-----------------( END COPY )----------------------

I assume that Setup executive will also ask for Admin permission. Can any test on a WIN7 WIN8 machine>

At least the "WHQL%20Certified" title may relieve School IT Anxiety a little??
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: ElliottW on Jul 02, 2014, 12:04 am
Hello again,

Just to point it out, the newer Arduinos don't need the FTDI version of the drivers. All of the current versions of the IDE have signed drivers that will install nicely using the dpinst method mentioned earlier. They also install with the packaged version of the IDE.

Any method of installing drivers will ask for administrative permissions. I've tested this quite a bit on Windows 7.

The non-profit I work at has put together an MSI installer for the drivers which you could use if you like. All this MSI does is use the dpinst method mentioned before. However, I doubt your school would be excited about that either. Regardless, you can find some more information here: https://www.manylabs.org/docs/general/usingSensors/

We'll open source this sometime this summer, so you eventually won't have to just take my word for it.  :)
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: terryking228 on Jul 02, 2014, 12:12 am
Hi,
After the volume of problems with the controller-based USB interfaces on Arduino I stuck with FTDI on my latest version (Like THIS: (http://yourduino.com/sunshop2/index.php?l=product_detail&p=225) but R3 pinout)

Sparkfun's new RedBoard  HERE: (https://www.sparkfun.com/products/12757) has also gone back to FTDI.

KISS

YMMV
Title: Re: Automatically Pre-installing Drivers for Non Administrators
Post by: CrossRoads on Jul 02, 2014, 07:34 am
I only use FTDI in my boards too. No messing with programming another chip to make things happen.
I also set up for offboard USB/Serial, so I guess you could use this 8U2 equipped board
http://arduino.cc/en/Main/USBSerial
if you didn't want a Sparkfun FTDI Basic,
https://www.sparkfun.com/products/9716

or clone equivalent:
http://www.tinyosshop.com/index.php?route=product/product&product_id=600