I was installing a driver over and over, and thought that there must be a better way than going to the device manager. Well, it turns out that there is.
The plug and play utility (pnputil.exe) is designed for this purpose. The following installs from an INF named mydriver.inf.
pnputil.exe -i -a "c:\OEM\mydrive.inf"
Which I included in the following batch file, which copies the driver to a folder on the C drive, installs the driver, then reboots if the user agrees.
@echo off xcopy /s /e /q /Y /I OEM c:\OEM pnputil.exe -i -a "c:\OEM\mydrive.inf" echo. echo. echo A reboot is necessary for these changes to take effect. echo. set /p input= "Reboot Now (Y/N)?" echo %input% IF "%input%"=="y" goto :REBOOT IF "%input%"=="Y" goto :REBOOT goto :EOF :REBOOT shutdown /r /t 0
@echo off
xcopy /s /e /q /Y /I OEM c:\OEM
echo. echo. echo A reboot is necessary for these changes to take effect. echo. set /p input= "Reboot Now (Y/N)?"
echo %input% IF "%input%"=="y" goto :REBOOT IF "%input%"=="Y" goto :REBOOT goto :EOF
:REBOOT shutdown /r /t 0
Copyright © 2015 – Bruce Eitman and Embedded101.com All Rights Reserved
Re: Windows 10 IoT Core: Shutdown and Reboot the Raspberry Pi
Bruce, I noticed that you are sending a REST web request for controlling the pi. I looked online a for...
-- Waleed Elmandouh
Re: Windows 10 IoT Core: Getting the MAC Address from Raspberry Pi
Hi. This no longer works for me in the iot-core custom OEM-build/FFU. They have changed the access levels...
-- GG
Hi, since I am having trouble with this intervace in an OEM-custom Image/FFU scenario, I wonder, how...
I like your project here, and I've used it, and at one time it worked, at least with an older version...
-- integral
Nifty, Bruce!
-- David Jones
Hi Bruce, Good to know you are playing with Windows 10 IoT, and thanks for sharing these great finding...
-- Samuel Phung