Enumerating Click To Run Installed Products for Office 365 ProPlus (2013) Print E-mail
Office 365
Written by Darwin Sanoy   
Wednesday, July 23, 2014 5:23pm

With the May 2014 release of the Office 365 Pro Plus Click To Run, Microsoft introduced the ability to install less than the entire Office suite.  Prior to this, enterprises installing Office 365 Pro Plus using *Click To Run* (NOT Windows Installer / MSI) could only install the entire suite - just like when 365 Click To Run is pull installed from the Microsoft Office 365 portal.  Awesome move Microsoft!  Many companies are planning to push only Lync 2013 Click To Run and follow up with the full Office Suite later or perhaps will need to add OneDrive at some point.  This raises an interesting question... How do you tell what 365 sub-products are already installed?



This question is especially important if you need to update a given machine and add a product, but not the entire suite.  So say you want to add OneDrive for Business sync agent to a bunch of machines that already have Lync.  You'll need to be able to understand that only Lync is on the machine so you can create a new config.xml that contains only Lync and OneDrive (whose identifier is "Groove")

In order to install only some products, you must configure an exclusion for each product you *don't want* in your config.xml.  So to add OneDrive to a machine that contains Lync, you'll need to exclude all others - but that requires you to know which ones are already installed or you'll accidentally remove them (and be very unpopular with your manager).

PowerShell is up to the task, but we have to do a little trickery to get what we actually intend to get.

To understand which 365 Click To Run products are installed you can view the registry key "HKLM:\SOFTWARE\Microsoft\Office\15.0\ClickToRun\ProductReleaseIDs\Active\O365ProPlusRetail\x-none\"  There is a subkey with the name of a zip file for each product.  This is specifically the language neutral bits, so saves us having to identify the language edition installed.

From these keys we need to address two challenges: [a] get a clean product list whose identifiers match the official identifier list so we can use them directly in building a config.xml, [b] to ignore supplemental related product ids that don't have official exclude ids (e.g. "dcf.x86.x-none-zip", "office.x86.x-none-zip").

So one line of PowerShell can retrieve the list of products, strip the ".x86.x-none-zip" and strip the unwanted product ids:

$CSI_CurrentlyInstalledProductIDs = @(get-itemproperty HKLM:\SOFTWARE\Microsoft\Office\15.0\ClickToRun\ProductReleaseIDs\Active\O365ProPlusRetail\x-none\* | select -expandproperty pschildname | %{$_.replace('.x86.x-none.zip','') | where-object {@("Access","Excel","InfoPath","Lync","Groove","OneNote","Outlook","PowerPoint","Project","Publisher","SharePointDesigner","Visio","Word") -contains "$_"} })

This results in the array $CSI_CurrentlyInstalledProductIDs containing a list of the installed product ids - but only ones that match Microsoft's official list.  Get-ItemProperty retrieves all the sub-keys, then "Select" expands the key name and $_.replace removes the unwanted portion.  Our "Where-Object" clause filters the list to only contain product ids that are on Microsoft's list.

Another challenge is determining whether the full suite is installed.  If you have not licensed Visio or Project as Click To Run, then when you perform a full install from your media, you will end up not having those IDs on your system.  In addition, I have never seen the id "SharePointDesigner" installed on any system, even though it is in Microsoft's list.  So here is some code to determine if I would consider this system to have the full suite (and therefore not need *any* product exclusions configured in config.xml).

$global:CSI_IsOffice365CTRFullSuiteInstalled = @(Compare-Object @("Access","Excel","InfoPath","Lync","Groove","OneNote","Outlook","PowerPoint","Publisher","Word) $CSI_CurrentlyInstalledProductIDs | where {$_.sideindicator -eq "<="}).count -eq 0

The above code uses Compare-Object to determine if there is anything in the array given that is not in the product retrieved.

Please note that in both cases the array that filters the registry key and the one that determines if the full suite is installed can both be set as variables to make the code more succinct.

A couple challenges still exist that we will address in a future blog post:

  • Combining the list of installed products with a list of new products to install - but eliminating any overlapping products.
  • Taking a list of "products to install" and doing array magic to come up with the opposite - a list of products to *exclude* (because config.xml needs you to exclude everything you *don't* want.

If you're getting set to deploy Lync 2013 or Office 365 Pro Plus using the new Microsoft deployment technology Click To Run, then you're going to want to be the first to know when our new course goes live.  

Click here for a special 50% discount on the release of our new course "Lync 2013 / Office 365 Click To Run Deployment: Technical Blueprints and Ready to Run Code".