The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Updating Microsoft Office on Windows from a batch file

Posted by jpluimers on 2026/04/21

This batch file works for modern Click-to-Run (sometimes called ClickToRun, Click2Run or C2R) based Office installations (note the odd lowercase microsoft shared which indeed is the actual directory name):

if exist "%CommonProgramFiles%\microsoft shared\ClickToRun\OfficeC2RClient.exe" (
  "%CommonProgramFiles%\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user
) else (
  echo could not find the Office Updater
)

This for sure does not work for MSI based Office 2013 and lower (which are updated through Windows Update anyway). Since I only have 2021 online (Click-to-Run) installs and higher to test with: those work fine.

It should work on most Click-to-Run installations that are architecture neutral.

That means older versions of office (I think 2013 and older) are excluded. Some notes on these:

Wikipedia Office/Click-to-Run links

  • [Wayback/Archive] “click-to-run” – Search results – Wikipedia
  • Microsoft Office 2010: Installation and deployment – Wikipedia

    Office 2010 introduces a new Click-to-Run installation process based on Microsoft App-V Version 4 streaming and virtualization technology as an alternative to the traditional Windows Installer-based installation process for the Home and Student and Home and Business editions, and as a mandatory installation process for the Starter edition. Click-to-Run products install in a virtualized environment (a Q: partition) that downloads product features in the background after the programs have been installed so that users can immediately begin using the programs. The download process is optimized for broadband connections.

  • Microsoft Office 2013: New feaures – Wikipedia

    Office 2013 introduces Click-To-Run 2.0 installation technology for all editions based on Microsoft App-V Version 5. Previously, only certain editions of Office 2010 were available with Click-To-Run 1.0 installer technology, which was based on App-V 4.x, where a separate Q drive was created and installed files of Office were isolated from the rest of the system, causing many Office add-ins to not be compatible. With the newer Click-To-Run technology, Office 2013 installs files just like Windows Installer (MSI) to the Program Files directory. Retail versions of Office 2013 use the Click-to-Run installer. Volume-licensed versions use Windows Installer (MSI) technology. Some editions like Professional Plus are available in both retail (C2R) and volume (MSI) channels.

  • Microsoft Office 2016: New features, Windows

    Microsoft Office 2016 cannot coexist with Microsoft Office 2013 apps if both editions use Click-To-Run installer, but it can coexist with earlier versions of Microsoft Office, such as 2003, 2007, and 2010 since they use Windows Installer (MSI) technology. Microsoft requires that any 2013 versions be uninstalled, which it will offer to do automatically, before the 2016 versions can be installed.

  • Microsoft Office 2016: Traditional editions – Wikipedia

    Retail versions of Office 2016 for Windows use the Click-to-Run installer. Volume-licensed versions of Office 2016 use Windows Installer (MSI) technology. Some editions like Professional Plus are available in both retail (C2R) and volume (MSI) channels.

  • Microsoft Office 2019: Traditional editions – Wikipedia

    Unlike its predecessor, both Windows version retail & volume versions use the Click-to-Run (C2R) for installation. Also unlike its predecessor, all Windows version Office 2019 require only Windows 10 and Windows Server 2019.

  • Microsoft Office 2019: Deployment – Wikipedia

    For Office 2013 and 2016, various editions containing the client apps were available in both Click-To-Run (inspired by Microsoft App-V) and traditional Windows Installer setup formats. However, Office 2019 client apps only have a Click-to-Run installer and only the server apps have the traditional MSI installer. The Click-To-Run version has a smaller footprint; in case of Microsoft Office 2019 Pro Plus, the product requires 10 GB less than the MSI version of Office 2016 Pro Plus.

    Volume licensing versions of Office 2019 cannot be downloaded from Microsoft Volume Licensing Service Center and must be deployed using configuration.xml and running Office Deployment Tool (ODT) from command-line.

  • Microsoft Office 2021 – Wikipedia does not even mention Click-to-Run any more, but is Click-to-Run based.
  • Microsoft 365: Desktop applications – Wikipedia

    The Microsoft 365 desktop applications (formerly marketed as Microsoft Office) are primarily used on personal computers running Microsoft Windows, and are distributed as part of the Microsoft 365 subscription. They are installed using a “click-to-run” system which allows users to begin using the applications almost instantaneously, while files are downloaded in the background. Updates to the software are installed automatically, covering both security and feature updates. These applications were one of the core components of the initial Office 365 service.

  • Microsoft App-V – Wikipedia
  • Windows Installer – Wikipedia

Note that Office 2016, 2019 and 2021 are various incarnations of Office 16 each requiring a new license.

Via

  • [Wayback/Archive] batch file – How to change the Update Channel for Microsoft Office 365 Apps? – Super User (thanks [Wayback/Archive] HackSlash)

    Q

    I want my users to be on the Semi-Annual channel that updates every 6 months for stability. For my own system I want to be on the current version of Office so I can get all the new features and work through any bugs before my users see them.
    How do I change just my workstation to have a different update channel than how it was deployed by the ODT?

    A

    This can be easily accomplished from an administrative command prompt.

    Here is an example batch script:

    REM Change O365 Update Channel
    "C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /changesetting Channel=Current
    "C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeC2RClient.exe" /update user
    

    You can specify any valid channel setting here. They seem to change often but as of this writing the options are:

    • Beta
    • Current (Preview)
    • Current
    • Monthly Enterprise
    • Semi-Annual Enterprise (Preview)
    • Semi-Annual Enterprise
  • [Wayback/Archive] Batch file to update Office Channel version for 32-bit and 64-bit Office installs? (thanks [Wayback/Archive] net1994 and [Wayback/Archive] Winnie Liang)

    Q

    Hello all – We have deployed Office 2016 click to run clients in our Windows 10 x64 bit OS environment. The vast majority of Office clients are 32-bit and a good size are 64-bit. The problem is that they are on the wrong channel release “Semi-Annual Channel” and I need to change it to “Monthly” on the system (for every user who logs in). The below is the batch file I will use to update the clients. It works fine when I run it on 32-bit Office installs. However will this work on both 32-bit AND 64-bit Office installs? If not, what do I need to change/add so it does for both?
    Thanks!

    BAT file:

    setlocal
    reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration\ /v CDNBaseUrl
    if %errorlevel%==0 (goto SwitchChannel) else (goto End)
    :SwitchChannel
    reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v CDNBaseUrl /t REG_SZ /d "http://officecdn.microsoft.com/pr/492350f6-3a01-4f97-b9c0-c7c6ddf67d60" /f
    reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v UpdateUrl /f
    reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration /v UpdateToVersion /f
    reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Updates /v UpdateToVersion /f
    reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Office\16.0\Common\OfficeUpdate\ /f
    "%CommonProgramFiles%\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user
    :End
    Endlocal

    A

    The BAT file you shared can work for both 32 bit and 64 bit Office 2016 click to run app.

  • [Wayback/Archive] Simple ‘one click’ force an update to Microsoft Office – Office Watch

    Silent Mode

    You can also do this “silently” with no on-screen prompts by adding some more parameters like this:

    "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user displaylevel=false forceappshutdown=true

    displaylevel=false  – stops the on-screen display by Office update.

    forceappshutdown=true – closes any Office apps to allow the update to complete.

    updatepromptuser=false – if True will prompt the user for permission before applying updates.

    Switch to specific version – updatetoversion

    There’s another option available in OfficeC2RClient.exe that’s really handy if you’re having trouble with the latest update.

    updatetoversion lets you choose a specific past version of Office to install. Use this to ‘roll back’ to a previous known-stable build. The default is the most recent version available.

    For example: "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user updatetoversion=16.0.11111.1111

  • [Wayback/Archive] Update history for Microsoft 365 Apps (listed by date) – Office release notes | Microsoft Learn
  • [Wayback/Archive] Command-line Options for Updating Office 2013 in Service Pack 1 | ITPro Today: IT News, How-Tos, Trends, Case Studies, Career Tips, More

    Using an OfficeC2RClient.exe, located in the %Program Files%\Microsoft Office 15\ClientX86 or %Program Files%\Microsoft Office 15\ClientX64

  • [Wayback/Archive] Manually triggering updates in Office 2013
    I ran the below command to update to SP1 (had to do this stepwise, it didn’t work otherwise):
    c:\Program Files\Microsoft Office 15\ClientX64>officec2rclient.exe /update user
    updatetoversion=15.0.4569.1507 displaylevel=true

    This successfully updated to Office 2013 SP1. Once SP1 was installed, I opened Word 2013, went to “Account”, and then to “Update Options”, and selected “Update Now” (this being available only as of SP1).

    This in turn updated me to 15.0.4893.1002 (the most current version) per the Office Update History page (see below).

    TechNet Blog Post:
    https://blogs.technet.microsoft.com/odsupport/2014/03/03/the-new-update-now-feature-for-office-2013-click-to-run-for-office365-and-its-associated-command-line-and-switches/

    MS Update History Page:

    https://support.office.com/en-us/article/Update-history-for-Office-2013-19214f38-85b7-4734-b2f8-a6a598bb0117?ui=en-US&rs=en-US&ad=US

    It links to the below, now defunct, pages (which are available in archived form):

    • [Wayback/Archive] The new Update Now feature for Office 2013 Click-to-Run for Office365 and its associated command-line and switches – Office Deployment Support Team Blog
      This new feature allows users to check for and install updates for Office on demand.  Under the hood, there is a new OfficeC2RClient.exe file that makes this possible.
      Outside of this user interface, the OfficeC2RClient.exe can be run from an administrative command-prompt by constructing an appropriate command-line in the following format:
      %Program Files%\Microsoft Office 15\ClientX86 | ClientX64\OfficeC2RClient.exe /update user variable1=value variable2=value … variableN=value
      Where the variables are optional settings and based on the following table:
      Variable Possible Values Description
      updatepromptuser
      True | False  (Default: False)
      This specifies whether or not the user will see this dialog before automatically applying the updates:
      Office updates are availableOffice updates are available
      forceappshutdown
      True | False  (Default: False)
      This specifies whether the user will be given the option to cancel out of the update. However, if this variable is set to True, then the applications will be shut down immediately and the update will proceed.
      displaylevel
      True | False  (Default: True)
      This specifies whether the user will see a user interface during the update. Setting this to false will hide all update UI (including error UI that is encountered during the update scenario).
      updatetoversion
      15.0.xxxx.xxxx  (Default: Install the latest released build)
      This specifies the version to which Office needs to be updated to.  This can used to install a newer or an older version than what is presently installed.
      A list of Click-to-Run version numbers is published at http://support.microsoft.com/gp/office-2013-click-to-run.
      For example, if you want to down date to the November build of Office, you would use the following command:
      C:\Program Files\Microsoft Office 15\Clientx64\OfficeC2RClient.exe /update user updatetoversion=15.0.4667.1002
    • [Wayback/Archive] Update history for Office 2013 – Microsoft Office

Queries

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.