Office will not install or repair — 30015, 30088, 30183, 30029-4, 1058-13
A Click-to-Run install or repair stops partway with a hyphenated error code. The number is almost never the real fault — a previous install left files behind, something is holding a file open, or the architecture of what is already installed does not match what is being installed.
What you see
Setup runs to somewhere between 10% and 90% and then shows "Something went wrong" with a code like 30015-6 (-1) or 30088-1015. Retrying produces the same code at the same point. On a machine that already has Office, the installer may instead refuse to start at all with 30029-4.
What is actually wrong
Click-to-Run installs into a virtualised package and repairs by replacing it wholesale, so it cannot proceed past a file another process has open, a partially removed previous install, or a mismatch between the 32-bit and 64-bit builds. 1058-13 is different in kind: it usually means a service is disabled or security software is blocking the installer's own executable.
Codes and articles
Start here — find out which fix applies
A script that runs the 8 inspection commands from the write-up below and prints what each one returned. It reads the machine and changes nothing — every command that could write, delete, start or stop is excluded from it by construction. Run this first, then pick the fix its output points at.
Fixes (4)
Run the repair from the command line, not the Control Panel
Office is installed and misbehaving. Start here — an online repair fixes most of these without removing anything.
Close every Office application, including the background processes that outlive the windows.
Get-Process WINWORD,EXCEL,OUTLOOK,POWERPNT,MSACCESS,ONENOTE,ms-teams,Teams,OfficeClickToRun -ErrorAction SilentlyContinue | Stop-Process -ForceA repair that cannot replace a file in use fails with exactly the codes in this entry. The Control Panel repair does not tell you which process blocked it, which is why it appears to fail at random.
Confirm the installed architecture so the repair is told the right one.
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' | Select-Object Platform, ClientVersionToReport, ProductReleaseIdsRun a quick repair first. It re-registers the installation without downloading anything, and it takes a couple of minutes.
& "$env:CommonProgramFiles\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=Repair platform=x64 culture=en-us RepairType=QuickRepair DisplayLevel=TrueChange platform= to x86 if the value read above says 32-bit. Passing the wrong one is itself a source of 30015.
If the quick repair does not hold, run the full online repair. This re-downloads the whole package, so allow for several gigabytes and do not start it on a metered connection.
& "$env:CommonProgramFiles\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=Repair platform=x64 culture=en-us RepairType=FullRepair DisplayLevel=True
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' | Select-Object ClientVersionToReportRemove the remains of the previous install properly
A repair fails, or a previous version was uninstalled and the new one will not go on. Appwiz uninstall routinely leaves registration behind that blocks the next install.
Record what is currently registered, so you know what to put back.
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' | Format-List ProductReleaseIds, Platform, UpdateChannel, ClientCultureProductReleaseIds is the list of products the licence covers. Reinstalling without it gets you a different edition than the one that was there, which is the usual reason activation then fails as well.
Download and run the Microsoft Support and Recovery Assistant's Office uninstall tool. It is the only removal that clears the Click-to-Run registration, the scheduled tasks, the shell extensions and the licence tokens together.
Start-Process 'https://aka.ms/SaRA-officeUninstallFromPC'Let it restart the machine when it asks. Do not skip this — the removal is not complete until the pending file operations have run.
Confirm nothing is left registered before reinstalling.
Test-Path 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun'This should now be False. If it is still True the removal did not finish, and reinstalling on top will reproduce the original error.
Reinstall from the portal, choosing the same architecture and the same products you recorded in the first step.
Resolve a 32-bit / 64-bit conflict
30029-4, or setup says it cannot install this version because another is present.
Find out which architecture is installed.
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' | Select-Object PlatformCheck for standalone Office products that install separately and pin the architecture — Project, Visio and the Access Runtime are the usual ones.
Get-Package -Provider Programs -ErrorAction SilentlyContinue | Where-Object Name -match 'Microsoft (Office|365|Project|Visio|Access)' | Select-Object Name, VersionEvery Click-to-Run product on a machine must be the same bit-ness. A 32-bit Visio installed years ago will block a 64-bit Office and the error names neither of them.
Decide which architecture you actually want. 64-bit is the right default now; keep 32-bit only if a required add-in or an Access database with 32-bit ODBC dependencies forces it.
Remove everything Click-to-Run with the SaRA tool, then install every product again at the chosen architecture in one pass.
Start-Process 'https://aka.ms/SaRA-officeUninstallFromPC'
Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' | Select-Object Platform, ProductReleaseIdsClear what is blocking the installer itself
1058-13, or setup exits within seconds of starting.
Confirm the services the installer depends on are running.
Get-Service ClickToRunSvc, msiserver, BITS, wuauserv | Select-Object Name, Status, StartType1058 is the Windows error for "the service cannot be started because it is disabled". A hardening policy or a cleanup tool that disabled msiserver or BITS produces this and nothing in the Office error names the service.
Start anything that is stopped and set it back to manual.
foreach ($s in 'msiserver','BITS') { Set-Service $s -StartupType Manual; Start-Service $s }Check whether security software quarantined part of the installer, and look at the setup log for the last thing it did.
Get-ChildItem "$env:TEMP" -Filter '*.log' | Where-Object Name -match 'Microsoft Office|SetupExe' | Sort-Object LastWriteTime -Descending | Select-Object -First 3Retry the install with real-time protection paused, if your endpoint policy permits it, and re-enable it immediately afterwards.
Related faults
Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.