Determine Office Edition Script

Table of Contents

By request, here is a script to detect the installed edition of Office.
Currently only supports 2007 and 2010 but can be adapted easily enough.

This site was used as a reference – http://support.microsoft.com/kb/2186281

Set objWord = CreateObject("Word.Application")

Select Case objWord.Version
Case "12.0"
strYear = "2007"
Case "14.0"
strYear = "2010"
Case Else
strYear = "Unsupported Version"
End Select

intRelease = Right(Left(objWord.ProductCode(),2), 1)

Select Case intRelease
Case "0"
strRelease = "Pre Release"
Case "1"
strRelease = "Beta 1"
Case "2"
strRelease = "Beta 2"
Case "3"
strRelease = "RC 0"
Case "4"
strRelease = "RC 1"
Case "9"
strRelease = "RTM"
Case Else
strRelease = "Unknown"
End Select

intType = Right(Left(objWord.ProductCode(),3),1)

Select Case intType
Case "0"
strType = "Volume license"
Case "1"
strType = "Retail/OEM"
Case "2"
strType = "Trial"
Case Else
strType = "Unknown"
End Select

intProduct = Split(objWord.ProductCode(),"-")(1)

Select Case intProduct
Case "0011"
strProduct = "Professional Plus"
Case "0012"
strProduct = "Standard"
Case "0013"
strProduct = "Basic"
Case "0014"
strProduct = "Prosessional"
Case "002F"
strProduct = "Home and Student"
Case "008B"
strProduct = "Office Small Business Basics"
Case Else
strProduct = "Unknown"
End Select

intArch = Split(objWord.ProductCode(),"-")(3)

Select Case intArch
Case "1000"
strArch = "x64"
Case "0000"
strArch = "x86"
End Select

WScript.Echo "Microsoft Office " & strProduct & " " & strYear & " " & strArch & " [" & strType & "] " & strRelease
WScript.Echo "Product Code: " & objWord.ProductCode()
objWord.Quit