Script for updating the Intel USB3/3.1 Controller/Hub/Switch devices in Win8+

It is technical thread to discuss implementation of a script for automated update Intel USB3/3.1 Controller/Hub/Switch devices in Win8+

It began here
USB 3.0/3.1 Drivers (original and modded) (52)

Current version of script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
@echo off

set step=updating Controller Driver...
echo %step%
echo %step% > .\update.log.txt
dpinst.exe /path ".\Controller Driver - as first" /sa /q /f
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Hub Driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path ".\Hub Driver - as second" /sa /q /sh
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Switch Driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path ".\Switch Driver - only if applicable" /sa /q /sh
echo result code: %Errorlevel% >> .\update.log.txt

set step=rebooting Windows...
echo %step%
echo %step% >> .\update.log.txt
shutdown -r -f -c "Rebooting after Intel USB3/3.1 drivers update"
echo result code: %Errorlevel% >> .\update.log.txt
 

Next version.
Change log:
- added output of the current date into log file;
- added the check for a subfolders with drivers;
- added command line parameter "/c" for dpinst.exe to set its output into command console;
- added output of dpinst.exe console log messages into log file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
@echo off
 
date /T > .\update.log.txt
 
set controller=".\Controller Driver - as first"
set hub=".\Hub Driver - as second"
set switch=".\Switch Driver - only if applicable"
 
set step=checking Controller driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %controller% /B
if %errorlevel% NEQ 0 exit
 
set step=checking Hub driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %hub% /B
if %errorlevel% NEQ 0 exit
 
set step=checking Switch driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %switch% /B
if %errorlevel% NEQ 0 exit
 
set step=updating Controller driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %controller% /sa /q /f /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Hub driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %hub% /sa /q /sh /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Switch driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %switch% /sa /q /sh /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=rebooting Windows...
echo %step%
echo %step% >> .\update.log.txt
shutdown -r -f -c "Rebooting after Intel USB3/3.1 drivers update"
echo result code: %Errorlevel% >> .\update.log.txt
 

Fernando, all you have to do when you are preparing new driver bundle is set those three vars to a correct values:

1
2
3
 
set controller=".\Controller Driver - as first"
set hub=".\Hub Driver - as second"
set switch=".\Switch Driver - only if applicable"
 


Just replace the names of folders and do not touch quotes <">, dot <.> and slash <\>.

@mbk1969 :
Thanks again for willing and having taken the time to create and publish a script, which may give users without any non-Intel USB port the opportunity to manually install the mod+signed Intel USB 3.0/3.1 drivers without risking a total failure of all input devices.

Zitat von mbk1969 im Beitrag #3
Fernando, all you have to do when you are preparing new driver bundle is set those three vars to a correct values:

1
2
3
 
set controller=".\Controller Driver - as first"
set hub=".\Hub Driver - as second"
set switch=".\Switch Driver - only if applicable"
 

My future mod+signed Intel USB 3.0 driverpacks will contain the following subfolders:
  • Controller-Driver_as-first
  • Hub-Driver_as-second
  • Switch-Driver_as-third-if-applicable

Here are the download links to my latest mod+signed Intel USB 3.0/3.1 drivers:

Here you go:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
@echo off

date /T > .\update.log.txt

set controller=".\Controller-Driver_as-first"
set hub=".\Hub-Driver_as-second"
set switch=".\Switch-Driver_as-third-if-applicable"

set step=checking Controller driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %controller% /B
if %errorlevel% NEQ 0 exit

set step=checking Hub driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %hub% /B
if %errorlevel% NEQ 0 exit

set step=checking Switch driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %switch% /B
if %errorlevel% NEQ 0 exit

set step=updating Controller driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %controller% /sa /q /f /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Hub driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %hub% /sa /q /sh /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Switch driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %switch% /sa /q /sh /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=rebooting Windows...
echo %step%
echo %step% >> .\update.log.txt
shutdown -r -f -c "Rebooting after Intel USB3/3.1 drivers update"
echo result code: %Errorlevel% >> .\update.log.txt
 


Of course script should be tested before you start to distribute it within the bundle.
Can you send me dpinst.exe so that I could try it? I just don`t want to download the whole WDK from MS sight.

Since I am currently travelling and just have a notebook and a cell phone with me, I don’t have access to such data. I am sorry about it.

Since I am currently travelling and just have a notebook and a cell phone with me, I don’t have access to such data. I am sorry about it.



Well, then I just will search the Web. No big deal. There is no rush.

is this the DPINST you’re looking for?

https://ufile.io/e1fec



This is 32-bit version of dpinst.exe

Here is 64-bit version
http://originaldll.com/file/dpinst64.exe/24157.html

Minor changes:
- added redirection of dir commands output into log file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
 
@echo off

date /T > .\update.log.txt

set controller=".\Controller-Driver_as-first"
set hub=".\Hub-Driver_as-second"
set switch=".\Switch-Driver_as-third-if-applicable"

set step=checking Controller driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %controller% /B >> .\update.log.txt
if %errorlevel% NEQ 0 exit

set step=checking Hub driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %hub% /B >> .\update.log.txt
if %errorlevel% NEQ 0 exit

set step=checking Switch driver folder...
echo %step%
echo %step% >> .\update.log.txt
dir %switch% /B >> .\update.log.txt
if %errorlevel% NEQ 0 exit

set step=updating Controller driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %controller% /sa /q /f /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Hub driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %hub% /sa /q /sh /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=updating Switch driver...
echo %step%
echo %step% >> .\update.log.txt
dpinst.exe /path %switch% /sa /q /sh /c >> .\update.log.txt
echo result code: %Errorlevel% >> .\update.log.txt

set step=rebooting Windows...
echo %step%
echo %step% >> .\update.log.txt
shutdown -r -f -c "Rebooting after Intel USB3/3.1 drivers update"
echo result code: %Errorlevel% >> .\update.log.txt
 


It appears that this xml-file should be near the dpinst.exe:
1
2
3
4
5
6
 
<?xml version="1.0" ?>
<dpinst>
<enableNotListedLanguages/>
<suppressAddRemovePrograms/>
<language code="0x0409"/>
</dpinst>
 

with name "dpinst.xml".

Fernando, I successfully executed the script on my work rig with your "64bit Intel USB 3.0+3.1 Drivers v5.0.1.38 mod+signed by Fernando" bundle and all devices were updated from v5.0.0.32 to v5.0.1.38.

So you can prepare new bundles with script and dpinst. The link for 64 bit version of dpinst.exe I placed above leads to archive with "dpinst64.exe" inside. If you will use that archive you should rename exe-file to "dpinst.exe" for 64-bit version of driver bundle because script calls exe-file with that name.
You should add three files to a bundle: dpinst.exe (32-bit or 64-bit - according to a bundle), dpinst.xml (see previous post) and update.bat.

That is very good news - thanks for having done the whole work and for having tested it!

I will do it as soon as possible (not before this evening).

@mbk1969 :
Unfortunately I can get neither the 32bit not the 64bit variant of the file dpinst.exe properly downloaded and extracted (either the 7z archive is shown as corrupted or my Antivirus MS Defender announces a found virus).
Can you please upload both files to good hoster and post a link via PM?



Will do…

But of course it would be safer if someone else could test script. I tested only on notebook with Win8.1

@mbk1969 :
Meanwhile I returned from my travelling and am able to do some tests with different systems.
I just have successfully tested your update.bat and dpinst.xml in combination with the old dpinst.exe and my recently offered “64bit Intel USB 3.0+3.1 drivers v5.0.1.38 mod+signed by Fernando” with my Z170 system running Win10 x64 Build 15014.
Result: The driver update worked flawlessly.
Here is the content of the update.log.txt file:

20.01.2017
checking Controller driver folder…
iusb3xhc.cat
iusb3xhc.inf
iusb3xhc.man
iusb3xhc.sys
checking Hub driver folder…
iusb3hub.cat
iusb3hub.inf
IUsb3Hub.man
iusb3hub.sys
checking Switch driver folder…
iusb3hcs.cat
iusb3hcs.inf
iusb3hcs.sys
WdfCoInstaller01009.dll
updating Controller driver…
result code: 1
updating Hub driver…
result code: 1
updating Switch driver…
result code: 1073741825
rebooting Windows…
result code: 0

That`s good. Did you update from MS drivers or previous Intel ones?
I think that new versions of dpinst.exe is better. I will look into the check tool to minimize the risk of what happened to your Surface device.

From the MS Win10 in-box ones. It was a fresh install of the Win10 x64 Pro Insider Preview Build 15014.

Can you rollback and try with new version of dpinst.exe and without dpinst.xml? The less files the less chances to get a corrupted one.

@mbk1969 :
Good news from my side: Your procedure worked again, this time with the newer dpinst.exe and without dpinst.xml.

Yes, after having redone a clean install of Win10 x64 Pro Insider Preview Build 15014 (this time I took the EN-US variant) I have repeated the test.

This is what I did after the clean OS installation and the usual optimization steps:

  1. Replacement of the dpinst.exe (size now: 914 KB) and removal of the dpinst.xml file from the test folder
  2. Import of the Win-RAID CA Certificate
  3. Test A:
    Right-click onto the dpinst.exe from within the Test folder and choosing the "Run as Admin" option. In case of success this would have been the easiest way to get the mod+signed Intel USB 3.0 drivers installed.
    Result: Installation failure (The dpinst process started, but gave me the message, that no matching drivers could be found). Nothing had been changed by this test.
  4. Test B:
    This time I ran the Windows PowerShell as Admin, navigated to the Test folder and executed the dpinst.exe (I had to enter ".\dpinst.exe"). In case of success we wouldn’t really need the update.bat file.
    Result Installation failure (The message has been the same as with Test A). Nothing had been changed by this test.
  5. Test C:
    Again I ran the Windows PowerShell as Admin, navigated to the Test folder and executed the update.bat (I had to enter ".\update.bat").
    Result: Success! After the automaticly done device driver updates had been completed, I was able to close the PowerShell and to reboot.
    Once the OS was up again, I checked the related USB devices within the Device Manager and got the following informations:

    DPInst test pic1.png

    DPInst test pic2.png

    DPInst test pic3.png


    Here is the content of the file update.log.txt:

    21.01.2017
    checking Controller driver folder…
    iusb3xhc.cat
    iusb3xhc.inf
    iusb3xhc.man
    iusb3xhc.sys
    checking Hub driver folder…
    iusb3hub.cat
    iusb3hub.inf
    IUsb3Hub.man
    iusb3hub.sys
    checking Switch driver folder…
    iusb3hcs.cat
    iusb3hcs.inf
    iusb3hcs.sys
    WdfCoInstaller01009.dll
    updating Controller driver…
    result code: 1
    updating Hub driver…
    result code: 1
    updating Switch driver…
    result code: 1073741825
    rebooting Windows…
    result code: 0

What I do not know until now is, whether the ".\update.bat" command can be replaced by "update.bat", if the "normal" CMD (instead of the Windows PowerShell) will be used.

As next step I will try to do a similar test with my MS Surface 3 Pro.

You can use “update.bat” instead of “.\update.bat” when in CMD and current folder (prompt text to the left side of ‘>’) is the same with “update.bat”. In Windows ".&quot; means current folder.
But when you are in PowerShell it is better use “.\update.bat” - this form is 100% distinguishable from internal PowerShell commands.

Better hold the test with Surface until I give you utility to check relevance of inf-file for current rig.