New
#31
13th Feb 2018 - Code changed after reviewing the suggestions made [dism-related PS commands used instead of straightforward dism commands to achieve a more well-structured output for analysis in Excel]
Thanks for all your responses. I now use a Dism-related pair of PS commands and some NirSoft utilities within my driver backup batch file to create driver data tables.
The csv output from DSE has an extra column that I thought might be useful but as I cannot generate it through my batch file then I will not use it.Code::: Export drivers Dism /online /export-driver /destination:%BackupFolder% :: Export table of third-party drivers powershell.exe Get-WindowsDriver -Online ^| Export-CSV '%BackupFolder%\DismDriversList-3rdParty.csv' :: Export table of all drivers powershell.exe Get-WindowsDriver -Online -all ^| Export-CSV '%BackupFolder%\DismDriversList-All.csv' :: Get HardwareIDs list powershell.exe Get-WmiObject Win32_PNPEntity ^| Select Name, Manufacturer, DeviceID, Status ^| Export-CSV "%BackupFolder%\HardwareIDs.csv" :: Get DriverView output %ToolsFolder%\NirSoft\DriverView\%ProgFilesFolder%\DriverView.exe /scomma "%BackupFolder%\DriverView.csv" :: Get InstalledDriversList output %ToolsFolder%\NirSoft\InstalledDriversList\%ProgFilesFolder%\InstalledDriversList.exe /scomma "%BackupFolder%\InstalledDriversList.csv" :: Get DevManView output %ToolsFolder%\NirSoft\DevManView\%ProgFilesFolder%\DevManView.exe /scomma "%BackupFolder%\DevManView.csv"
I have read through all the comments and amended my batch file.
- On the only occasion when I needed to use my driver backups in anger I learnt that it was the combination of all my existing outputs that allowed me to track down the source of my problem and then to correct it.
- On that occasion, I had reinstalled Windows on my tablet in order to ditch Android and have a Windows-only tablet.
-- The pre-installed drivers had been correct.
-- The downloadable set of drivers were the latest available but were nevertheless incorrect because they had replaced one piece of hardware without changing the downloadable set of drivers.
-- I was saved by the driver backups I had made before starting my reinstallation on this tablet and I only managed to identify the missing/incorrect item by using these lists.
- I'd rather have driver data that never gets used than fail to fix a problem by not having that data.
Denis
Last edited by Try3; 13 Feb 2019 at 14:34.