Category Archives: Scripting
Inject PNP Drivers in Windows 7 post deployment
If you need a process to find and install drivers post process (after Windows or later as an update)
- Populate this key with a path to your drivers
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\PnPUnattend\DriverPaths\1
Path = “d:\Drivers” <- String
- From a script, batch, MDT, setupcomplete.cmd, whatever, Run pnpunattend.exe
(built into Windows 7 and also there for Vista )
Example: Pnpunattend.exe auditsystem
You can use /s to just search the drivers but not install. Also, use the /L to output to command so you can pipe into a file if needed.
USAGE:
PnPUnattend.exe [auditSystem | /help /? /h] [/s] [/L]
auditSystem Online driver install.
/help /? /h This help.
/s Search without installing.
/L Print Logging information to the command line.
VBScript: List MS hotfixes installed
==Code start==
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:” _
& “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)
Set colQuickFixes = objWMIService.ExecQuery _
(“Select * from Win32_QuickFixEngineering”)
For Each objQuickFix in colQuickFixes
‘ Wscript.Echo “Computer: ” & objQuickFix.CSName
Wscript.Echo “Description: ” & objQuickFix.Description
if objQuickFix.HotFixID<>”File 1″ then Wscript.Echo objQuickFix.HotFixID
wscript.Echo “Installation Date: ” & objQuickFix.InstallDate
Wscript.Echo “Installed By: ” & objQuickFix.InstalledBy
Next
==Code End==