Blog

Determine Office Edition Script

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Set objWord = CreateObject("Word.Application")
 
SelectCase objWord.Version
Case"12.0"
strYear = "2007"
Case"14.0"
strYear = "2010"
CaseElse
strYear = "Unsupported Version"
EndSelect
 
intRelease = Right(Left(objWord.ProductCode(),2), 1)
 
SelectCase 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"
CaseElse
strRelease = "Unknown"
EndSelect
 
intType = Right(Left(objWord.ProductCode(),3),1)
 
SelectCase intType
Case"0"
strType = "Volume license"
Case"1"
strType = "Retail/OEM"
Case"2"
strType = "Trial"
Case Else
strType = "Unknown"
EndSelect
 
intProduct = Split(objWord.ProductCode(),"-")(1)
 
SelectCase 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"
EndSelect
 
intArch = Split(objWord.ProductCode(),"-")(3)
 
SelectCase intArch
Case"1000"
strArch = "x64"
Case"0000"
strArch = "x86"
EndSelect
 
WScript.Echo "Microsoft Office " & strProduct & " " & strYear & " " & strArch & " [" & strType & "] " & strRelease
WScript.Echo "Product Code: " & objWord.ProductCode()
objWord.Quit

Posted in: Scripts, Technical

Leave a Comment (0) ↓

Leave a Comment