I am trying to understand why the first line of my batch file fails to execute. My code is as follows:
if exist reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" goto OptionOne
exit
:OptionOne
some code
goto:eof
It never goes to the OptionOne subroutine. Instead, it just exits.
I do have a solution to this problem written differently (so I don't want examples to make it work) but I want to understand why this one line fails to execute.
Is the syntax improper? Google says it is correct.
Poorly designed code? I know this registry key exists so this is not the case.
Is it something with the return value and its correct syntax, but needs to be further written out on the else statements?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)