Reputation: 3353
Is it possible to determine in init.ps1, whether Update 2 (or later) of Visual Studio 2012 Premium is installed? I found $dte.Version
and $dte.Edition
, but more detailed information seems to be missing ...
Upvotes: 1
Views: 295
Reputation: 1178
dte.Version
should be the Information you need. The following post shows the version numbers for Update 1 (11.0.51106.01) and Update 4 (11.0.61030.00) (I can confirm this value)
Visual Studio 2012 Update 4 installs but still says Update 1
Edit:
OK, seems to be a bit harder:
You can retrieve the path to devenv.exe with $dte.FullName
and then retrieve the file-version.
My powershell knowledge is very limited, so here is the c# code:
FileVersionInfo.GetVersionInfo(@"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe")
The resulting FileVersionInfo has the property ProductVersion
which contains the information you need.
Upvotes: 1