How to Detect Installed Versions of Visual Studio

Post specialized setup scripts you have created here.
Posts: 4
Joined: Fri Mar 02, 2007 8:27 pm
Location: Lakewood, Colorado

How to Detect Installed Versions of Visual Studio

Postby jperson » Fri Jul 04, 2008 7:31 pm

My company deals a lot with installing .NET assemblies for particular versions of Visual Studio, including installed "Express" editions. Since InstallAware has saved me so much time, I thought I give something back to the community here. The attached script will use the registry to determine which versions of Visual Studio are installed: 2002, 2003, 2005 or 2008. In addition, direct paths to DEVENV.EXE are resolved, which is very handy for creating shortcuts to solutions or projects which require a specific version. The script has been in production use for a couple of years now. With it included, you can target specific versions like this:

Code: Select all

if Variable VS2002_IsInstalled Equals TRUE
if Variable VS2003_IsInstalled Equals TRUE
if Variable VS2005_IsInstalled Equals TRUE
if Variable VS2008_IsInstalled Equals TRUE

... code is also included to resolve paths to GACUTIL.EXE, which can be useful for removing assemblies from the GAC during uninstalls. Lastly, paths are also resolved for installed versions of the Compact Framework. Hopefully this saves people some time, and thanks for making InstallAware scripting so powerful and easy to use!

File Attached:

Detect Visual
Jon Person

Return to “Sample Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests