I have searched this site for a while and didn't really see my answer so figured I would join and ask in the event it may help someone else in the future.
Currently I am trying to setup a batch file which will take output from pnputil, parse the data and pass on variables to have items deleted based on the parse.
Will be honest I haven't scripted anything in a very long time so I am having a hard time recalling what exactly I did.
I know this isn't complete but here is what I have so far;
Code: Select all
@ECHO OFF
SETLOCAL EnableDelayedExpansion
pnputil.exe -e > C:\test.txt
FOR /F "tokens=2* delims=:" %%G IN (C:\test.txt) DO CALL :SORT
:SORT
DEL C:\test.txt
I think my thought process on this is flawed.
The other part which I am a little confused on is the IF statement to actually perform the parse for what I need. I require the .INF name that has the driver package provider of HP. Can I just set a variable of HP then recursive search 2 line prior?
I am not wanting someone just to "do it for me" but if someone could point me in the right direction I would appreciate it. Would rather do it myself and learn than have it just handed to me not knowing how it works.
Thanks again~