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
end
if Variable VS2003_IsInstalled Equals TRUE
end
if Variable VS2005_IsInstalled Equals TRUE
end
if Variable VS2008_IsInstalled Equals TRUE
end
... 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 Studio.zip