0

I want to read a registry key's child key name and assign the child key name to a variable. I am not getting an registry query to do it.

For ex: My current key is like this "ProviderName/SoftwareName/8.0". The last part 8.0 can change as and when I switch versions. I would want to read this version number.

Thanks in advance !! Prakash

prakashjv
  • 329
  • 2
  • 8
  • 16

1 Answers1

0

the REG command is what you will have to parse the output for.

REG QUERY HKLM\Software\Microsoft\Office

will show you office versions (as well as some common keys)

for /f "tokens=5 delims=\" %a in ('REG QUERY HKLM\Software\Microsoft\Office') do echo %a

will output the information. you will have to convert the info into a number, then test to see if it is bigger.

SeanC
  • 15,695
  • 5
  • 45
  • 66