none
Use WMI to find office version while differentiating between Office 2016 and 2019 RRS feed

  • General discussion

  • Title says it all!

    Set objWord = CreateObject("Word.Application")
    
    wscript.echo objWord.Name
    
    wscript.echo objWord.Caption
    
    wscript.echo objWord.Version
    
    wscript.echo objWord.Build
    
    objWord.Quit

    So far I've got the above script to display:

    Microsoft Word
    
    Word
    
    16.0
    
    16.0.11901

    However, I'm running Word 2019 and need to be able to differentiate between whether Office16 is relating to 2016 or 2019 using anything that can be rolled out using GPO but preferably WMI.

    Any help is appreciated!

    • Changed type Bill_Stewart Tuesday, September 24, 2019 6:22 PM
    • Moved by Bill_Stewart Tuesday, September 24, 2019 6:23 PM Off-topic/unanswerable
    Thursday, August 15, 2019 6:34 PM

All replies

  • CreateObject with a "Word.Application" moniker has nothing to do with WMI and requires Word be installed for the object to be accessible from script.

    What does "using anything that can be rolled out using GPO but preferably WMI" mean? Roll out what?


    -- Bill Stewart [Bill_Stewart]

    Thursday, August 15, 2019 6:36 PM
  • WMI cannot detect 2019/2016 versions if it is a click-to-install.

    There is no facility in a GPO to detect a products version if It is not available via WMI.

    You can detect the version with a startup script deployed by GPO.


    \_(ツ)_/

    Thursday, August 15, 2019 9:29 PM
  • No. I m going to take that back. Now both 2016/2019 c2r versions are listed in WMI.

    Get-WmiObject win32_product -filter "Name LIKE '%office%'" -ComputerName ws702 | Select-Object Name, Version

    Post in the GP forum to learn how to use this with a GPO.


    \_(ツ)_/

    Thursday, August 15, 2019 9:37 PM
  • Is the question about how to use a WMI filter in a GPO? This would not be the correct forum for that question.


    -- Bill Stewart [Bill_Stewart]

    Friday, August 16, 2019 3:09 PM