locked
Detect Visual Studio Version RRS feed

  • Question

  • Hello,
    What is the safest and best way to detect if either Visual Studio .NET 2005 (all editions) or Visual Studio .NET 2008 (all editions) or even both are installed on the target system?
    Thanks :)
    Thursday, August 13, 2009 10:25 PM

Answers

  • Found a better way.


    Try these:

    Visual Basic 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VBExpress\9.0\Setup\VS\ProductDir
    Visual C++ 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCExpress\9.0\Setup\VS\ProductDir
    Visual C# 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCSExpress\9.0\Setup\VS\ProductDir
    Visual WebDev 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VWDExpress\9.0\Setup\VS\ProductDir
    Visual Studio 2008 Standard - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\Std\ProductDir
    Visual Studio 2008 Professional - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\Pro\ProductDir
    Visual Studio Team System 2008 Architecture Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTA\ProductDir
    Visual Studio Team System 2008 Test Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTT\ProductDir
    Visual Studio Team System 2008 Development Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTD\ProductDir
    Visual Studio Team System 2008 Team Suite - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTS\ProductDir
    Visual Studio 2008 Shell - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\IDE\ProductDir

    and these:

    Visual Basic 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VBExpress\8.0\Setup\VS\ProductDir
    Visual C++ 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCExpress\8.0\Setup\VS\ProductDir
    Visual C# 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCSExpress\8.0\Setup\VS\ProductDir
    Visual J# 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VJSExpress\8.0\Setup\VS\ProductDir
    Visual WebDev 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VWDExpress\8.0\Setup\VS\ProductDir
    Visual Studio 2005 Standard - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\Std\ProductDir
    Visual Studio 2005 Professional - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\Pro\ProductDir
    Visual Studio 2005 Team Edition for Software Architects - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTA\ProductDir
    Visual Studio 2005 Team Edition for Software Testers - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTT\ProductDir
    Visual Studio 2005 Team Edition for Software Developers - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTD\ProductDir
    Visual Studio 2005 Team Suite - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTS\ProductDir
    Visual Studio 2005 Premier Partner Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\IDE\ProductDir
    Visual SourceSafe 2005 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSS\ProductDir
    Visual Studio 2005 Tools for the Microsoft Office System - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTO\ProductDir

    Credits go entirely to Aaron Stebner. The 2 blog posts that I saw on the matter:

    http://blogs.msdn.com/astebner/archive/2006/01/11/511887.aspx
    and
    http://blogs.msdn.com/astebner/archive/2007/10/18/5516901.aspx

    Cheers


    Please remember to mark the replies as answers if they help you.
    • Marked as answer by YiChun Chen Monday, August 17, 2009 8:18 AM
    Friday, August 14, 2009 5:22 PM
  • Hi OSVBNET,

    Joao has a good suggestion for you.

    Here are also two helpful blog that refers to how to detect Visual Studio 2005 SP1 and Visual Studio 2008 SP1.
    Please see: http://blogs.msdn.com/heaths/archive/2006/12/17/detecting-visual-studio-2005-service-pack-1.aspx
                     http://blogs.msdn.com/heaths/archive/2009/05/29/detecting-visual-studio-2008-service-pack-1.aspx

    Hope this helps! :)

    Best regards,
    Yichun Chen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Tuesday, August 18, 2009 3:26 AM
    Monday, August 17, 2009 8:25 AM

All replies

  • Try to check the registry under:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

    You can access registry values easilly. Check out this article on CodeProject:
    http://www.codeproject.com/KB/vb/registry_with_vb.aspx

    Cheers

    Please remember to mark the replies as answers if they help you.
    Friday, August 14, 2009 12:39 AM
  • Hi,
    I think the best path to check is :

    AccessDatabaseEngine2007

    HKEY_CLASSES_ROOT\VisualStudio.DTE.8.0

    HKEY_CLASSES_ROOT\VisualStudio.DTE.9.0

    What do you think?

    Friday, August 14, 2009 7:30 AM
  • Found a better way.


    Try these:

    Visual Basic 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VBExpress\9.0\Setup\VS\ProductDir
    Visual C++ 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCExpress\9.0\Setup\VS\ProductDir
    Visual C# 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCSExpress\9.0\Setup\VS\ProductDir
    Visual WebDev 2008 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VWDExpress\9.0\Setup\VS\ProductDir
    Visual Studio 2008 Standard - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\Std\ProductDir
    Visual Studio 2008 Professional - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\Pro\ProductDir
    Visual Studio Team System 2008 Architecture Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTA\ProductDir
    Visual Studio Team System 2008 Test Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTT\ProductDir
    Visual Studio Team System 2008 Development Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTD\ProductDir
    Visual Studio Team System 2008 Team Suite - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\VSTS\ProductDir
    Visual Studio 2008 Shell - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS\IDE\ProductDir

    and these:

    Visual Basic 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VBExpress\8.0\Setup\VS\ProductDir
    Visual C++ 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCExpress\8.0\Setup\VS\ProductDir
    Visual C# 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VCSExpress\8.0\Setup\VS\ProductDir
    Visual J# 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VJSExpress\8.0\Setup\VS\ProductDir
    Visual WebDev 2005 Express - HKEY_LOCAL_MACHINE\Software\Microsoft\VWDExpress\8.0\Setup\VS\ProductDir
    Visual Studio 2005 Standard - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\Std\ProductDir
    Visual Studio 2005 Professional - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\Pro\ProductDir
    Visual Studio 2005 Team Edition for Software Architects - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTA\ProductDir
    Visual Studio 2005 Team Edition for Software Testers - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTT\ProductDir
    Visual Studio 2005 Team Edition for Software Developers - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTD\ProductDir
    Visual Studio 2005 Team Suite - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTS\ProductDir
    Visual Studio 2005 Premier Partner Edition - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\IDE\ProductDir
    Visual SourceSafe 2005 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSS\ProductDir
    Visual Studio 2005 Tools for the Microsoft Office System - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS\VSTO\ProductDir

    Credits go entirely to Aaron Stebner. The 2 blog posts that I saw on the matter:

    http://blogs.msdn.com/astebner/archive/2006/01/11/511887.aspx
    and
    http://blogs.msdn.com/astebner/archive/2007/10/18/5516901.aspx

    Cheers


    Please remember to mark the replies as answers if they help you.
    • Marked as answer by YiChun Chen Monday, August 17, 2009 8:18 AM
    Friday, August 14, 2009 5:22 PM
  • Hi OSVBNET,

    Joao has a good suggestion for you.

    Here are also two helpful blog that refers to how to detect Visual Studio 2005 SP1 and Visual Studio 2008 SP1.
    Please see: http://blogs.msdn.com/heaths/archive/2006/12/17/detecting-visual-studio-2005-service-pack-1.aspx
                     http://blogs.msdn.com/heaths/archive/2009/05/29/detecting-visual-studio-2008-service-pack-1.aspx

    Hope this helps! :)

    Best regards,
    Yichun Chen
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by YiChun Chen Tuesday, August 18, 2009 3:26 AM
    Monday, August 17, 2009 8:25 AM