Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine office version

Status
Not open for further replies.

ljg

IS-IT--Management
Oct 2, 2002
163
US
I'm looking for a script to run (manually from command prompt) to connect to a remote computer and determine the version of MS Office running on it. Heyscriptingguy has this script:
********************************
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colApps = objWMIService.ExecQuery _
("Select * from Win32_Product Where Caption Like '%Microsoft Office%'")
For Each objApp in colApps
Wscript.Echo objApp.Caption, objApp.Version
Next
*********************************
how can I change this so it runs on a DIFFERENT computer?

Thanks!!
 
strComputer = "DIFFERENT"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I receive the error "(2,1) Microsoft VBScript runtime error: The remote server machine does not exist or is unavailable: 'GetObject'
 
What is YOUR actual code ?
Did you type a valid computer name in lieu of the dot ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Besides checking if you have a valid computer name listed, you need to make sure you have admin rights on the box, it is also possible that WMI is damaged on the remote machine, and if you're trying to query a Win2k3 server Win32_Product is not installed by default.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top