Originally Posted By: ShaneEP
The only consistent method I could find online to determine the bitness of Office, is to use WMI. It is pretty slow, but seems to work.

 Code:
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
$colSoft = $objWMIService.ExecQuery("SELECT * FROM Win32_Product WHERE Name Like 'Microsoft Office%'")

If $colSoft.Count = 0
   $bits = "na"		; Office not installed
Else
   For Each $objItem In $colSoft
      $item = $objitem.caption
      If InStr($item, "-bit") AND Len($bits) = 0
         $bits = Right(Split($item, "-bit")[0], 2)
      Endif
   Next
EndIf

? "Bits: "+$bits

get $



thanks, but it seems it's not given the right bits.
i have office Professional Plus 2010 32bit installed.
my version is: 14.0.7106.5003 (32-bit).
and when i run the script it says "Bits: 64"..

is there another way to get this information?? (the bits..)

thanks in advanced...


Edited by Mart (2014-01-09 05:02 PM)
Edit Reason: Updated title