I am playing around with reg, and reg query a lot, but I want to check if a key exist with out it showing "ERROR:"
This is what I have so far to that...
Code: Select all
reg query "%RegKey%" /e >nul>nul
if "%errorlevel%"=="1" >nul reg add "%RegKey%" /ve
So if you don't know how that code will work I will explain... The first line is the read the reg key, mmmK. The second one uses "errorlevel" that is if it returns true or false, but if it returns false it will make the key because it does not exist but gives me an error, which I would like to hide
But my ">nul>nul" wont work any suggestions
Thanks for your time