How can we check if and which version of Visual Studio Shell is installed, from a batch script?
I understand we can check the existence of file/folder say under
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
But I am looking for a more elegant and generic solution.
Any help?
Update to accepted answer:
Your answer is elegant and does the task. Since I was specifically checking for certain versions, I am using (after checking the link you provided):
@echo off
reg query "HKEY_CLASSES_ROOT\VisualStudio.DTE.10.0" >> nul 2>&1
if %ERRORLEVEL% NEQ 0 ( echo VS 2010 not installed ) else ( echo VS 2010 installed. )
reg query "HKEY_CLASSES_ROOT\VisualStudio.DTE.11.0" >> nul 2>&1
if %ERRORLEVEL% NEQ 0 ( echo VS 2012 not installed ) else ( echo VS 2012 installed. )