Microsoft:- Office 365 – Version

Background

Those who are charged with purchasing Microsoft products are noticing that Microsoft is running full steam ahead with its transition from selling products to selling services.

In days gone by customers spaced along a few years, customers will buy Office 2010, Office 2013, Office 2017, etc.

More recently it is Office 365.

Question

Earlier today one of the managers I am tasked with supporting sent along an error message.

I looked at the error message and it seems likely the error is sourced to a Microsoft Office Version Mismatch.

 

What is the Application’s Version?

I am used to launching a desktop application and accessing the menu item Help & About to determine the application’s version number.

Office 365

Desktop Application / GUI

With Office 365, one has to access the menu items File & Account.

In the Account window, please peruse the About panel.

Image

Textual

  1. Product
    • Subscription Product:- Microsoft 365 Apps for Enterprise
  2. Office Updates
    • Updates are managed by your system administrator
  3. About Access
    • Version 2102 ( Build 13801.20150 Click-to-Run )

 

Programs & Features

Image

Textual

  1. Name:- Microsoft 365 Apps for Enterprise – en-us
  2. Version:- 16.0.13801.21050

 

Registry

Microsoft Windows Registry contains version information for Office 365.

The exact registry branch is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration.

Image

 

Code

DOS/Batch
Syntax – Display Branch

REG QUERY <branch> /s 

Syntax – Display Branch – Item

REG QUERY <branch> /v <item> 

Script

setlocal

REM Get Branch:- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
REG QUERY HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /s

REM Get Branch:- HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
REM Get Item:- Platform
REG QUERY HKLM\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v Platform

endlocal

Output Image

Powershell
Script – Get Registry Item

<#
    Branch:- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
    Item:- Platform
#>
$platform = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration" -Name "Platform"

$log = "MS Office Bitness:- `t{0}" -f $platform;

Write-Output $log;

Output Image

 

Script – Get Registry Branch

<#
    Branch:- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
#>
[string] $ITEM="";

[int] $id=0;

[string] $FORMAT_OUTPUT = "{0,3} {1,-40} {2,-40}";

<#
    Get Registry @ HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration"
#>
$item = "HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration"

$listofItemProperties = Get-ItemProperty -Path $item;

if ($listofItemProperties)
{

    <#
        Convert retrieved registry entry to PS Object Properties
    #>
    $objPSObjectProperties = $listofItemProperties.PSObject.Properties;


    if ( $objPSObjectProperties )
    {

        Write-Output "";
        Write-Output "";
        
        $log = $FORMAT_OUTPUT -f "#", "Item", "Value";
        
        Write-Output $log;
        
        $log = $FORMAT_OUTPUT -f "=", "====", "=====";
        
        Write-Output $log;
    
        foreach ($itemProperty in $objPSObjectProperties) 
        {
            
            if ($itemProperty)
            {


                $id = $id + 1 ;
            
                $idAsString = $id.ToString() + ")";
                
                $itemName = $itemProperty.Name;
            
                $itemValue = $itemProperty.Value;
              
                $log = $FORMAT_OUTPUT -f $idAsString, $itemName, $itemValue;
                
                Write-Output $log;
            
            }
            
        }
        
    }
    
}


Summary

Quick Summary.

Depending on your use case, the Microsoft Office Version might make a difference.

 

References

  1. PDQ.com
    • Renzo Trujillo
      • Determine Office 365\2019 Bitness
        Link
  2. Microsoft
    • Powershell
      • Docs / PowerShell / Scripting / Reference / Microsoft.PowerShell.Management
      • Docs / PowerShell / Scripting / Reference / Microsoft.PowerShell.Management / Get-ChildItem
        • Get-ChildItem
          Link
      • Docs / PowerShell / Scripting / Reference / Microsoft.PowerShell.Management / Get-ItemPropertyValue
        • Get-ItemPropertyValue
          Link
      • Docs / PowerShell / Scripting / Reference / Microsoft.PowerShell.Management / Get-ItemProperty
        • Get-ItemProperty
          Link
  3. StackOverflow
    • Read registry settings recursively with Powershell
      Link
  4. 9to5IT
    • Gist
      • 9to5IT/Find-RegistryValues.ps1
        Link
  5. ss64
    • PowerShell
      • GetItemProperty
        Link

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s