I am installing drivers from a cab on a basic image and trying to speed up the process. I am not able to edit the image so this is my only means. However, when writing the batch I am running into a few issues. One I can't run it off of the the USB key I am using and. Lastlly/ most importantly it is hanging up on the last couple of commands. Any help with this would be amazing.
mkdir C:\Drivers\cab
cd C:\Drivers
Expand –F:* E:\E6540-WIN7-A11-KTJNT.CAB C:\Drivers\cab
cd C:\Drivers\cab\E6540\win7\x64
for /f %i in ('dir /b /s *.inf') do pnputil.exe -i -a %i
mkdir C:\Drivers\cab
cd C:\Drivers
Expand –F:* E:\E6540-WIN7-A11-KTJNT.CAB C:\Drivers\cab
cd C:\Drivers\cab\E6540\win7\x64
for /f %i in ('dir /b /s *.inf') do pnputil.exe -i -a %i