reg query help
Posted: 09 Aug 2013 18:56
hello,
I am really stuck on this task and not been able to get my script to work.
Here is what I want to do:
1. Search "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Printers" location (include all sub keys) for a value called "Test"
2. If the value exists, delete the test value.
So far have been able to do a simple reg query:
REG QUERY "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Printers" /v Test /s
My results are as follows: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Printers\PRINTER1\DsDriver
test REG_BINARY
End of search: 1 match(es) found.
How would I delete this value now? The problem I face is that this "test" value could be under any key.
Any help would be much appreciated
I am really stuck on this task and not been able to get my script to work.
Here is what I want to do:
1. Search "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Printers" location (include all sub keys) for a value called "Test"
2. If the value exists, delete the test value.
So far have been able to do a simple reg query:
REG QUERY "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Printers" /v Test /s
My results are as follows: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print\Printers\PRINTER1\DsDriver
test REG_BINARY
End of search: 1 match(es) found.
How would I delete this value now? The problem I face is that this "test" value could be under any key.
Any help would be much appreciated