BCUninstaller/Bulk-Crap-Uninstaller · error · TimeoutException
Update installer is busy
Error message
Update installer is busy
What it means
TimeoutException thrown by WaitForInstallerBusy when the WU installer reports IsBusy for too long. The method loops while wuaInstaller.IsBusy && count++ < 30 (sleeping 250ms each iteration, so up to ~7.5s) but throws once count >= 20 (~5s of sustained busy). It is called both before and after Uninstall(), so it guards against an installer that is already busy (pre) or never finishes (post). Note the loop ceiling (30) and throw threshold (20) differ, so the effective wait is the lower bound.
Source
Thrown at source/WinUpdateHelper/UpdateManager.cs:66
case OperationResultCode.orcSucceeded:
break;
case OperationResultCode.orcSucceededWithErrors:
break;
case OperationResultCode.orcFailed:
throw new COMException("Selected update is not uninstallable", result.HResult);
case OperationResultCode.orcAborted:
throw new OperationCanceledException("Selected update is not uninstallable");
}
Console.WriteLine("Uninstall successful");
}
private static void WaitForInstallerBusy(IUpdateInstaller wuaInstaller)
{
var count = 0;
// Wait for some seconds
while (wuaInstaller.IsBusy && count++ < 30) Thread.Sleep(250);
if (count >= 20)
throw new TimeoutException("Update installer is busy");
}
public static void WriteUpdateList()
{
var wuaSession = new UpdateSessionClass();
var wuaSearcher = wuaSession.CreateUpdateSearcher();
var wuaSearch = wuaSearcher.Search("IsInstalled=1 and IsPresent=1 and Type='Software'");
var updates = wuaSearch.Updates.OfType<IUpdate>().ToList();
foreach (var update in updates)
{
var id = update.Identity;
var result = HelperTools.KeyValueListToConsoleOutput(new List<KeyValuePair<string, object>>
{
new(nameof(id.UpdateID), id.UpdateID),
new(nameof(id.RevisionNumber), id.RevisionNumber),
View on GitHub (pinned to 608321de98)
Solutions
- Use a fresh IUpdateInstaller per operation instead of reusing a busy one.
- Ensure no other WU operation is in flight (check Settings / wuauclt) before starting.
- If legitimately slow, raise the count thresholds (and align the loop ceiling with the throw condition) to allow more wait time.
- Investigate a stuck installer via CBS.log / WindowsUpdate.log and restart wuauserv if hung.
Example fix
// before - inconsistent thresholds, short effective wait
while (wuaInstaller.IsBusy && count++ < 30) Thread.Sleep(250);
if (count >= 20) throw new TimeoutException("Update installer is busy");
// after - aligned budget with a configurable timeout
var deadline = DateTime.UtcNow.Add(TimeSpan.FromSeconds(30));
while (wuaInstaller.IsBusy && DateTime.UtcNow < deadline) Thread.Sleep(250);
if (wuaInstaller.IsBusy)
throw new TimeoutException("Update installer is busy"); Defensive patterns
Strategy: retry
Try / catch
for (int attempt = 0; attempt < 2; attempt++)
{
try { UpdateManager.UninstallUpdate(id); break; }
catch (TimeoutException ex) when (ex.Message == "Update installer is busy" && attempt == 0)
{ /* wait and retry once */ Thread.Sleep(TimeSpan.FromSeconds(10)); }
} Prevention
- Use a fresh IUpdateInstaller per operation rather than reusing a busy one.
- Ensure no other WU job is in flight before uninstalling.
- Align the loop ceiling and throw threshold if you need a longer wait, or switch to a deadline-based wait.
When it happens
Trigger: IUpdateInstaller.IsBusy stays true: another uninstall/install is in progress on the same installer object or WU session, the installer object was reused across operations, or the servicing stack is hung. Called right after Uninstall() when the operation is long-running.
Common situations: Reusing a single UpdateInstaller instance for multiple operations without waiting. A prior WU job still settling. Slow servicing stack on a busy/low-resource machine. Antivirus scanning the update payload stalling the installer.
Related errors
- Selected update was not found
- Selected update is not uninstallable
- Unknown HRESULT code: 0x{errorCode:X8}
- Multiple commands specified
- Unknown argument: {arg}
AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13).
Data as JSON: /api/errors/57d81e05c210f9ee.
Report an issue: GitHub.