I have a batch script that is querying a given file of registry paths and is saving the values of those in a text file. Many of this registries cant be found and here is my question. Is it possible to make an output only of the paths that cant be found and save them in a text file.
What I've found so far is "read_test 1 > %file2% 2>&1" this.
read_test ist my batch file
%file% is a path to a text file where I want to store it.
The problem with this is, that Im getting the whole output successful and not.
The first one is the successful output and the second one is not and I only want to save those that are not.
C:\Users\Test_System\Desktop\Only_Read_Win10>(REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\DeviceLock\DevicePasswordHistory" ) 1>>C:\Users\Test_System\Desktop\Only_Read_Win10\Target_Win10.txt
C:\Users\Test_System\Desktop\Only_Read_Win10>(REG QUERY HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SAM /v "RelaxMinimumPasswordLengthLimits" ) 1>>C:\Users\Test_System\Desktop\Only_Read_Win10\Target_Win10.txt ERROR: Given Key cant be found
Thank you in advance