Bat file. If Reg Key exists than goto...

Hsu Yao Chang 1 Reputation point
2021-11-09T13:51:49.697+00:00

Hi,
How to use bat to check adobe reader version , I run as below. But it fail to work
reg query "HKEY_CURRENT_USER\SOFTWARE\Adobe\Acrobat Reader\"

if %ERRORLEVEL% EQU DC goto VIRTUAL
if %ERRORLEVEL% EQU XI goto PHYSICAL

pause

:PHYSICAL
CLS
ECHO NO
Pause

:VIRTUAL
CLS
ECHO YES
PAUSE
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,532 questions
0 comments No comments
{count} votes