This is my code:
@echo off
echo Checking 32bit registry.
REG QUERY "HKLM\Software\EA GAMES\NFSMW" /v InstallDir >nul
If %ERRORLEVEL% == 0 goto CHECKEND
If %ERRORLEVEL% == 1 goto CHECK64
:CHECK64
echo Checking 64bit registry.
REG QUERY "HKLM\Software\Wow6432Node\EA GAMES\NFSMW" /v InstallDir >nul
If %ERRORLEVEL% == 0 goto CHECKEND
If %ERRORLEVEL% == 1 goto CLOSE
:CHECKEND
echo Registry key was found. Preparing uninstall...
:CLOSE
pause
exit
And my question is: How can i hide ERROR: The system was unable to find the specified registry key or value. if the key was not found?
Greetings.