Check the existence of a registry key with a batch file (DOS)
Posted on 2003-03-06
I want to be able to see if a machine has Access 97 on it or Access 2000. I decided I could check this by looking for the existence of the following key:
I need to check for the existence of this key via a batch file (DOS). I would like a way to easily check the existence of this key without using external files, example of which below,
REGEDIT /E file.txt HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\9.0\Access
FIND " " < file.txt
if errorlevel=1 echo Value not found!
This is not a good way of going about it because if the key doesn't exist, the file isn't created, then I would have to code for the existence of the text file. There has to be an EASIER and CONCISE way of doing this. Can anyone help?
And, if you can think of a way to check versions of Microsoft Access via a batch file that does not deal with the registry and is EASY and CONCISE, then please share your ideas with me.