Microsoft 365 Installation Problems

Force a Restart After an Office 365 Click-to-Run Installation

Nimra MalikNimra Malik Nov 25, 2026 868 views

Question details

The user needs to restart Windows after an Office 365 Click-to-Run installation completes.

Force a Restart After an Office 365 Click-to-Run Installation
Product
Office 365 Click-to-Run and Office Deployment Tool
Device & OS
Windows (version not provided)
Scenario
An administrator is deploying Office 365 and wants a restart workflow similar to the SETUP_REBOOT Always property used with Office 2013 Windows Installer deployments.
Observed behavior
Click-to-Run uses a different deployment model and does not provide the same SETUP_REBOOT property.
Before you start

Prepare the Office Deployment Tool setup.exe and a configuration XML for the Office products you want to install. Run the deployment script with administrative privileges, and warn users that a forced restart can close applications and discard unsaved work.

Solution 1Recommended

Add a restart action after the Office Deployment Tool finishes

Use a deployment script to wait for Click-to-Run setup and restart Windows when setup reports success.

The restart is a Windows deployment-script action, not an Office Deployment Tool equivalent of SETUP_REBOOT Always. Test the workflow in your deployment environment before using it broadly.

1
Prepare the deployment files

Place setup.exe from the Office Deployment Tool and your configuration.xml in a deployment folder. Confirm that the XML specifies the Office products and installation settings you need.

2
Run setup and wait for completion

In an elevated PowerShell deployment script, start setup and retain its exit code: $p = Start-Process -FilePath 'C:\Deploy\setup.exe' -ArgumentList '/configure "C:\Deploy\configuration.xml"' -Wait -PassThru. Replace the example paths with your deployment paths.

3
Restart after a successful exit

Immediately after the setup command, add: if ($p.ExitCode -eq 0) { shutdown.exe /r /f /t 60 /c "Office installation completed. Windows will restart in 60 seconds." } else { Write-Error "Office setup exited with code $($p.ExitCode); restart was not scheduled." }

4
Test the workflow

Run the script on a test device and confirm that setup finishes before the restart warning appears. If needed, use shutdown.exe /a during the countdown to cancel the scheduled restart.

Add a restart action after the Office Deployment Tool finishes
Forced restart behavior: The /f option forces running applications to close. The example restarts only when setup returns exit code 0; review other exit codes and your deployment tool's restart policies before changing that condition.
Free Microsoft Office alternative

Use WPS Office as an Alternative to Microsoft 365

WPS Office is a free, lightweight alternative with a familiar interface and compatibility with common Microsoft Office formats, making it easier to move existing documents. It does not change Microsoft 365 Click-to-Run restart behavior.

Free, lightweight office suiteCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar document, spreadsheet, and presentation toolsAn alternative to deploying Microsoft 365 Click-to-Run for everyday office work
microsoft office alternative - wps office

Frequently Asked Questions

Can I use SETUP_REBOOT Always with Office 365 Click-to-Run?

No. Click-to-Run uses a different deployment model from Office 2013 Windows Installer and does not provide the same property. Add a restart action to your deployment script instead.

How do I make the script wait for Office setup?

Use Start-Process with -Wait and -PassThru for setup.exe /configure. Then check the returned process's ExitCode before scheduling a restart.

How can I cancel the scheduled restart?

Run shutdown.exe /a during the restart countdown. Once the countdown ends, the restart may no longer be cancelable.

Will the restart close users' open applications?

Yes, if you use shutdown.exe /r /f. The /f option forces applications to close, so notify users and allow time to save their work.