I encountered error 4294967295 when installing Microsoft 365 with winget. The installer downloaded successfully and its hash was verified, but the Microsoft Office Click-to-Run installer failed when the package installation started.
This error is confusing because winget appears to work correctly until the final installer step. The package is found, the download completes, and the installer is verified. The failure comes from the Office installer or an existing Office installation rather than from the basic winget search operation.
The error
The command reported an installer failure similar to this:

The Microsoft 365 Click-to-Run installer returns exit code 4294967295.
The important line is:
Installer failed with exit code: 4294967295
What error 4294967295 means
4294967295 is the unsigned 32-bit representation of -1. In practical terms, it usually means that the Office Click-to-Run installer failed or returned an unexpected generic exit code.
The number does not identify one exact root cause. It is an indication that the installer could not complete successfully. The most common reasons are:
- Microsoft Office or Microsoft 365 is already installed.
- An earlier Office installation was only partially removed.
- The existing Click-to-Run installation is corrupted or in a bad state.
- Office files or services are locked while
wingetstarts another installer. - A previous update or repair operation is still pending.
- The installer does not have enough permission to modify the existing installation.
This is why repeatedly running the same winget install command may not fix the problem. The installer is often finding an existing Office state that must be repaired or removed first.
Quick answer
Use this order:
- Repair the existing Microsoft 365 or Microsoft Office installation with Quick Repair.
- If that fails, try Online Repair.
- Restart Windows and run
wingetfrom an Administrator PowerShell or Terminal. - If the installation is still broken, use Microsoft’s official Office uninstall tool, restart Windows, and install again.
The clean uninstall should be the last step because it removes the existing Office installation and may require applications, settings, and sign-in information to be configured again.
Method 1: Repair the existing Office installation
Repair is the most effective first method when Microsoft 365 or Office is already installed, partially installed, or corrupted.
- Open Settings.
- Select Apps.
- Select Installed apps.
- Find Microsoft 365 Apps, Microsoft Office, or a similar Office entry.
- Select the three-dot menu next to the application.
- Select Modify.
- Choose Quick Repair.
- Select Repair and wait for the process to finish.
- Restart the computer.
- Try the
wingetcommand again.
Quick Repair normally uses files already available on the computer. It is faster and may preserve the existing installation state while correcting broken files or registration information.
After the repair completes, close Office applications before trying winget again. This includes Word, Excel, Outlook, OneNote, Teams integrations, and any Office-related background process that is still running.
Re-run winget after Quick Repair
After Quick Repair completed, I ran the installation command again from an elevated PowerShell window. This time the Click-to-Run installer completed successfully:

The same winget installation succeeds after repairing the existing Office installation.
winget install --id "Microsoft.Office" --exact --source winget --accept-source-agreements --accept-package-agreements --forceThe successful result confirms that the original failure was related to the existing Office installation state rather than the package download. The repair cleared the condition that prevented Click-to-Run from completing.
Try Online Repair if Quick Repair fails
If Quick Repair does not resolve the problem, return to the same Modify screen and choose Online Repair instead.
Online Repair downloads fresh Office files and performs a more complete repair. It takes longer and may reset more application settings, but it is appropriate when the local Office installation is damaged or incomplete.
Save your work and make sure the computer has a working internet connection before starting Online Repair. Do not interrupt the repair by shutting down Windows or ending the installer process.
Restart Windows after the repair finishes, even if the repair window does not explicitly require it. A restart releases locked Office components and completes pending installer changes.
Method 2: Run winget as Administrator
After repairing Office, open an elevated terminal:
- Right-click the Start button.
- Select Terminal (Admin) or PowerShell (Admin).
- Approve the User Account Control prompt.
- Run the installation command again.
winget install --id "Microsoft.Office" --exact --source winget --accept-source-agreements --accept-package-agreements --forceThe options mean:
--id "Microsoft.Office": install the package with this exact identifier.--exact: do not select a similar package name.--source winget: use the configured Windows Package Manager source.--accept-source-agreements: accept the source agreement automatically.--accept-package-agreements: accept the package agreement automatically.--force: askwingetto continue the installation even when an existing package state may require a forced operation.
Running as Administrator does not repair a corrupted Click-to-Run installation by itself. It only ensures that the package installer has the permissions it needs. If the same error appears in an elevated terminal, continue with the repair or clean-uninstall method instead of repeatedly retrying the command.
Method 3: Completely uninstall Office first
If Quick Repair, Online Repair, and an elevated winget installation all fail, the existing Office installation may be too damaged for a normal repair. In that situation, perform a clean removal before reinstalling Microsoft 365.
Use Microsoft’s official Office uninstall tool:
Download the Microsoft Office uninstall tool
The tool is provided by Microsoft and is designed to remove Office installations that cannot be removed cleanly through the normal Windows settings page.
The general process is:
- Open the Microsoft Office uninstall tool link.
- Download and run the tool.
- Select the Office or Microsoft 365 installation that should be removed.
- Follow the prompts to remove all Office versions or components requested by the tool.
- Wait for the removal process to finish.
- Restart the computer.
- Open Terminal (Admin) or PowerShell (Admin).
- Run the
wingetinstall command again.
winget install --id "Microsoft.Office" --exact --source winget --accept-source-agreements --accept-package-agreements --forceDo not delete random Office folders from C:\Program Files or the Windows registry as a first response. Manual deletion can leave the Click-to-Run registration in an even more inconsistent state. Use the official removal tool unless you have a specific, documented reason to perform a manual cleanup.
Check the installation after reinstalling
After winget reports a successful installation, verify that the package is visible to Windows:
winget list --id "Microsoft.Office" --exactYou can also open the Start menu and launch Word or another Microsoft 365 application. Confirm that the application opens normally and that the expected account or license is available.
If the package is not shown by the exact winget query, search for related Office entries:
winget list Microsoft OfficeThe displayed package name may vary depending on the Microsoft 365 edition, language, architecture, and installer channel. The important check is that the Office applications open and the installation is not still reporting a pending repair or update.
Why the repair order matters
Quick Repair is the least disruptive option. It can correct an existing installation without removing the whole application. Online Repair is more thorough but takes longer and may restore more settings to their defaults.
Running winget as Administrator is useful when permissions are the remaining problem, but it should not be treated as a replacement for repairing Office. The installer can run with full permission and still fail if the Click-to-Run registration or local files are corrupted.
The official uninstall tool is the most disruptive option, so it belongs at the end of the process. It removes the state that is preventing the installer from working, but it also means that Office must be configured again after installation.
Recommended order
Use this short decision path:
| Order | Action | Why |
|---|---|---|
| 1 | Run Quick Repair from Installed apps. | Fastest and least disruptive repair. |
| 2 | Run Online Repair if Quick Repair fails. | Replaces more Office files and repairs a deeper installation problem. |
| 3 | Restart Windows and run winget as Administrator. |
Releases locked files and ensures installer permissions. |
| 4 | Run Microsoft’s Office uninstall tool. | Removes a damaged or partial installation completely. |
| 5 | Restart Windows and run the winget command again. |
Starts the clean installation from a known state. |
Final command reference
Repair the existing installation first through Settings → Apps → Installed apps → Microsoft 365 Apps → Modify.
Then use this command from an elevated terminal:
winget install --id "Microsoft.Office" --exact --source winget --accept-source-agreements --accept-package-agreements --force
If error 4294967295 continues after repair and elevation, use the official Microsoft Office uninstall tool, restart the computer, and install Microsoft 365 again.
The main lesson is that error 4294967295 usually points to the state of the existing Office Click-to-Run installation. Repair it first, elevate the installation command second, and perform a complete official removal only when the repair path does not work.
💬 Comments