MyInstall: Reducing Out-of-Box Drivers with Applications


I recently had an issue where my MDT Drivers (DeploymentShare\Out-of-Box Drivers) had grown considerably when I added drivers for new models.  After further checking I determined that it was my Media directory that was consuming 5.7GB (of 18 GB).

5-19-2015 10-53-36 AM


So a full third of my Drivers in MDT was related to Audio devices.  After further checking, it seemed that a single Manufacturer was consuming half of my Media.

5-22-2015 4-00-02 PM


So now I realize I have a problem with these drivers, which are Realtek.  I headed over to Realtek’s website where I found that I could download a Universal Driver for Windows Vista, Windows 7, Windows 8, Windows 8.1, and Windows 10 Driver (get the Zip).  Why they need 200MB (compressed) for Audio Drivers is beyond me, but oh well.

6-25-2015 8-48-21 AM


After downloading them I added them to my Out-of-Box Drivers to replace my multiple drivers and realized they would not work.  Apparently there are custom Hardware ID’s that designate different computer Manufacturers (Dell, Lenovo, etc) and MDT needs a match to use them.  Additional testing showed that I could install the drivers I downloaded on my Dell, even though MDT did not use them as they were not a proper match, and they worked perfectly.  So I realized this needs to be installed as an application.


So I created my directory in Applications, added the URL, placed the downloaded (extracted) drivers in a subdirectory, and added MyInstall.

6-25-2015 8-52-48 AM


After running MyInstall.vbs and having the Config file open, I added what I needed to install silently

6-25-2015 8-56-05 AM


With one key difference . . . I included a PNPID in the cComputerPNPID value (and yes I had to add this functionality to the script)


'====== Hardware Compatibility =========================================
cComputerManufacturer = ""
cComputerModel = ""
cComputerPNPID = "HDAUDIO\FUNC_01&VEN_10EC"


cComputerPNPID is basically a wildcard.  MyInstall will look for this string in Win32_PnPEntity.  The easiest way I can explain how this works is to review the LOG where I can see that it ran a WMI Query using what I entered as the string to search for.

6-25-2015 9-03-18 AM


As I was running this test on a VM, it did not install (since it did not find the Realtek Hardware) but on a Physical Computer that has Realtek Audio, everything installed properly.  Now I was able to reduce my Out-of-Box Drivers by 2.5GB, while also allowing me to update one Application, instead of multiple drivers for multiple models.

Full code below


'// This config file is in VBScript format

'====== MyInstall Script Properties ====================================
 cSimulation = False
 cConfirm = False
 cElevate = True

'====== Setup File Information =========================================
 cSetupFile = "R278\Setup.exe"
 cSetupx86 = ""
 cSetupx64 = ""

'====== Setup Switches =================================================
 cSetupSwitches = "/s /f2C:\RealTek.log /z[-rpC:\RealtekSetup.log]"

'====== Local Path =====================================================
 cLocalPath = "C:\Sample"

'====== Running Processes ==============================================
 cWaitForProcess = "SampleProcess.exe"

'====== Reboot Action ==================================================
 cRebootWithMDT = False

'====== Operating System Compatibility =================================
 cOSWindowsXP = False
 cOSWindowsVista = False
 cOSWindows7 = True
 cOSWindows8 = True
 cOSWindows81 = True
 cOSWindows10 = True

'====== Hardware Compatibility =========================================
 cComputerManufacturer = ""
 cComputerModel = ""
 cComputerPNPID = "HDAUDIO\FUNC_01&VEN_10EC"

'====== BIOS Compatibility =============================================
 cComputerBIOSVerMin = "A99"
 cComputerBIOSVerMax = "A99"

'====== Shortcut Creation ==============================================
 cShortcut1Location = ""
 cShortcut1TargetPath = ""
 cShortcut1WorkingDir = ""
 '===============================================================
 cShortcut2Location = ""
 cShortcut2TargetPath = ""
 cShortcut2WorkingDir = ""
 '===============================================================
 cShortcut3Location = ""
 cShortcut3TargetPath = ""
 cShortcut3WorkingDir = ""

'====== Script Information (No changes should be made below) ===========
 cScriptVersion = 20150625

'====== About ==========================================================
'// MyInstall.vbs Configuration File
'// MyInstall.config Last Updated 20150625
'// 
'// David Segura
'// https://winpeguy.wordpress.com/2015/06/24/reference-myinstall-config/
'// 
'// Supported Extensions for this script are *.*/BAT/CMD/EXE/MSI/MSP/MSU/INF/VBS

Advertisements