# Microsoft Office

## Overview

{% hint style="info" %}
**Dev Insight:** This script was extremely useful when patching for [CVE-2020-23397](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-23397).
{% endhint %}

This script will check for ClickToRun installations of Microsoft Office. If found, `OfficeC2RClient.exe` will be used to scan for and apply updates. If updates are found, users may be asked to close Microsoft Office applications to complete update installation.

**Prerequisites:** This script has no prerequisites.&#x20;

***

## Script

{% hint style="info" %}
Script will abort if no ClickToRun installations of Microsoft Office are detected.
{% endhint %}

{% @github-files/github-code-block url="<https://github.com/wise-io/scripts/blob/main/scripts/UpdateOffice.ps1>" %}

## Examples

```powershell
.\UpdateOffice.ps1
```

This example checks for ClickToRun installations of Microsoft Office. If found, a Microsoft Office update scan will be initiated.

***

## Parameters

This script has no parameters.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://scripts.aaronjstevenson.com/device-management/updates/microsoft-office.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
