List Currently Installed Office Applications Programmatically: Office Editions & Apps
In this article, we will discuss how to programmatically list the currently installed Office applications on a machine. This can be useful for inventory management, software deployment, and other IT tasks. We will cover the key concepts related to Office editions and apps, and provide detailed instructions on how to retrieve this information using various programming languages.
Office Editions
Microsoft Office is available in several different editions, including Home & Student, Home & Business, Professional, and more. Each edition includes a different set of applications, such as Word, Excel, PowerPoint, Outlook, and others. By understanding which edition of Office is installed on a machine, you can determine which applications are available.
Office Applications
The most common Office applications are Word, Excel, PowerPoint, and Outlook. Other applications, such as OneNote, Access, and Publisher, may also be installed depending on the Office edition. Each application has its own set of features and functions, and they can be used for a variety of tasks, such as word processing, spreadsheet creation, presentations, and email management.
Programmatically Listing Installed Office Applications
To programmatically list the installed Office applications on a machine, you can use a variety of programming languages, such as PowerShell, VBScript, and C#. We will provide examples for each of these languages below.
PowerShell
PowerShell is a powerful command-line tool that can be used to automate administrative tasks on Windows systems. To list the installed Office applications using PowerShell, you can use the following command:
Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "Microsoft Office*"} | Select-Object NameVBScript
VBScript is a scripting language that is built into Windows. To list the installed Office applications using VBScript, you can use the following code:
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Product WHERE Name LIKE 'Microsoft Office*'")
For Each objItem in colItems
WScript.Echo objItem.Name
Next
C#
C# is a popular programming language that can be used to create Windows applications. To list the installed Office applications using C#, you can use the following code:
using System;
using System.Management;
class Program
{
static void Main()
{
ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Product WHERE Name LIKE 'Microsoft Office*'");
foreach (ManagementObject product in searcher.Get())
{
Console.WriteLine(product["Name"]);
}
}
}
In this article, we have discussed how to programmatically list the currently installed Office applications on a machine. We have covered the key concepts related to Office editions and apps, and provided detailed instructions on how to retrieve this information using various programming languages. By using the code examples provided in this article, you can easily determine which Office applications are installed on a machine, and use this information for inventory management, software deployment, and other IT tasks.
References
- Microsoft Office Editions: https://www.microsoft.com/en-us/microsoft-365/buy/compare-microsoft-365-plans
- PowerShell Get-WmiObject: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-7.2
- VBScript GetObject: