dfnkt Posted June 18, 2008 Share Posted June 18, 2008 I am currently trying to write a batch file to query the registry to determine if internet explorer 7 is installed and echo a message to the user appropriately.The path in the registry is HKLM\Software\Microsoft\Internet Explorer\Version Vector The key is: "IE"IE 7 has a value of "7.0000" and 6 has a value of "6.0000". I am trying to develop a batch (wouldn't be opposed to VBS) to echo a msg to the user regarding what was found. By simply using@ECHO OFFREG QUERY "HKLM\Software\Microsoft\Internet Explorer\Version Vector" /v IEI can see what the value is but I would like to do something such as piping the key into find and evaluating it like so@ECHO OFFREG QUERY "HKLM\Software\Microsoft\Internet Explorer\Version Vector" /v IE |Find /I /C "7.0000"IF (%ERRORLEVEL% NEQ 0 GOTO noie7) ELSE (goto foundie7):noie7ECHO Internet Explorer 7 Not Found!:foundie7ECHO Internet Explorer 7 FOUND!PAUSEI have tried this exact batch only to get errors. It doesn't seem to want to recognize the ELSE part of the statement and just always says IE7 found regardless of what is actually present. I also looked at using vbs/wmi but I was unable to find the root\cimv2 or otherwise class for "add/remove" programs.Help? Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now