This script extracts the data to "%userprofile%\Desktop\test.txt" exactly as required.
I am having problems though with copy the first 3 rows from the file above and then extracting all the rows with the word FALSE in it and then sorting the file on row 4 downwards.
Code: Select all
@echo off
if exist "%userprofile%\Desktop\test.txt" (Del /f /q "%userprofile%\Desktop\test.txt" >NUL 2>&1)
echo.
driverquery /si > "%userprofile%\Desktop\test.txt"
Then find all rows with FALSE in from line 4 onwards in "%userprofile%\Desktop\test.txt" and copy it into "%userprofile%\Desktop\Drivers1.txt".
Then alphabetically sort "%userprofile%\Desktop\Drivers1.txt" from row 4 onwards.
Code: Select all
>"%userprofile%\Desktop\Drivers1.txt" findstr "\<FALSE\>" "%userprofile%\Desktop\test.txt"
del "%userprofile%\Desktop\test.txt"
echo.
Pause
Code: Select all
DeviceName InfName IsSigned Manufacturer
============================== ============= ======== =========================
Generic volume volume.inf TRUE Microsoft
Generic volume volume.inf TRUE Microsoft
Generic volume volume.inf TRUE Microsoft
Volume Manager machine.inf TRUE (Standard system devices)
DataTraveler 2.0 wpdfs.inf TRUE Kingston
UMBus Enumerator umbus.inf TRUE Microsoft
UMBus Root Bus Enumerator umbus.inf TRUE Microsoft
Microsoft System Management BI machine.inf TRUE (Standard system devices)
Plug and Play Software Device machine.inf TRUE (Standard system devices)
Terminal Server Mouse Driver machine.inf TRUE (Standard system devices)
Terminal Server Keyboard Drive machine.inf TRUE (Standard system devices)
Terminal Server Device Redirec machine.inf TRUE (Standard system devices)
Printer Port msports.inf TRUE (Standard port types)
WAN Miniport (SSTP) netsstpa.inf TRUE Microsoft
WAN Miniport (PPTP) netrasa.inf TRUE Microsoft
WAN Miniport (PPPOE) netrasa.inf TRUE Microsoft
WAN Miniport (IPv6) netrasa.inf TRUE Microsoft
WAN Miniport (IP) netrasa.inf TRUE Microsoft
WAN Miniport (Network Monitor) netrasa.inf TRUE Microsoft
WAN Miniport (L2TP) netrasa.inf TRUE Microsoft
User Mode Driver Frameworks Pl N/A FALSE N/A
Kernel Mode Driver Frameworks N/A FALSE N/A
Remote Access IPv6 ARP Driver N/A FALSE N/A
Storage volumes N/A FALSE N/A
Dynamic Volume Manager N/A FALSE N/A
VgaSave N/A FALSE N/A