cameramonkey
MIS
I have a batch file login script I need to run to determine if a certain version of Java is installed during startup, and if not, install it.
I found references to using "reg query" statements, but for some reason I get get it to return true/false values based n the info I found.
the consensus I found was that a two line command such as:
reg query HKCU\Software\Winamp
if errorlevel 1 goto not_exist
when I try to put that into real world use, I dont get an errorlevel, I get a return of every entry under the key I am referencing.
for example, I input:
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216022FF}
and instead of getting the expected result code of 0 or 1, I get a list of all of the items under that key if it is installed, or a more verbose "ERROR: The system was unable to find the specified registry key or value." error. if it is not.
ideas? am I missing a switch somewhere?
I found references to using "reg query" statements, but for some reason I get get it to return true/false values based n the info I found.
the consensus I found was that a two line command such as:
reg query HKCU\Software\Winamp
if errorlevel 1 goto not_exist
when I try to put that into real world use, I dont get an errorlevel, I get a return of every entry under the key I am referencing.
for example, I input:
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{26A24AE4-039D-4CA4-87B4-2F83216022FF}
and instead of getting the expected result code of 0 or 1, I get a list of all of the items under that key if it is installed, or a more verbose "ERROR: The system was unable to find the specified registry key or value." error. if it is not.
ideas? am I missing a switch somewhere?