BCUninstaller/Bulk-Crap-Uninstaller · error · NoWayToUninstallException

There is no valid way of uninstalling this entry

Error message

There is no valid way of uninstalling this entry

What it means

UninstallManager throws NoWayToUninstallException in the branch where the entry has no usable UninstallString to parse (the 'else' after attempting to build startInfo from the uninstall string). The harness cannot construct a process to launch, so it gives up with this domain exception rather than a NullReferenceException downstream.

Source

Thrown at source/UninstallTools/Uninstaller/UninstallManager.cs:115

                {
                    // Fall back to the non-quiet uninstaller
                    try
                    {
                        startInfo = ProcessTools.SeparateArgsFromCommand(entry.UninstallString).ToProcessStartInfo();
                        Debug.Assert(!startInfo.FileName.Contains(' ') || File.Exists(startInfo.FileName));

                        if (entry.UninstallerKind == UninstallerType.Nsis && !safeMode)
                            UpdateNsisStartInfo(startInfo, entry.DisplayName);
                    }
                    catch (FormatException)
                    {
                        fallBack = entry.UninstallString;
                    }
                }
                else
                {
                    // Cant do shit, capt'n
                    throw new NoWayToUninstallException();
                }

                if (simulate)
                {
                    Thread.Sleep(SimulationDelay);
                    if (Debugger.IsAttached && new Random().Next(0, 2) == 0)
                        throw new IOException("Random failure for debugging");
                    return null;
                }

                if (fallBack != null)
                    return Process.Start(new ProcessStartInfo(fallBack) { UseShellExecute = true });

                if (startInfo != null)
                {
                    startInfo.UseShellExecute = true;
                    return Process.Start(startInfo);
                }

View on GitHub (pinned to 608321de98)

Solutions

  1. Pre-filter the list to exclude entries whose UninstallString is null/whitespace, or disable the uninstall action for them.
  2. Offer an alternative action: 'Open Install Location' (using InstallLocation) or a manual registry-junk cleanup.
  3. Catch NoWayToUninstallException and mark the entry as 'manual uninstall only' so the bulk run continues.

Example fix

// before
var p = manager.CreateUninstallProcess(entry, options);

// after
if (string.IsNullOrWhiteSpace(entry.UninstallString))
{
    entry.MarkManualOnly("No uninstall command available.");
    return null;
}
var p = manager.CreateUninstallProcess(entry, options);
Defensive patterns

Strategy: validation

Validate before calling

if (string.IsNullOrWhiteSpace(entry.UninstallString))
{
    entry.MarkManualOnly("No uninstall command available.");
    return;
}
manager.CreateUninstallProcess(entry, options);

Type guard

null

Try / catch

try { manager.CreateUninstallProcess(entry, options); }
catch (NoWayToUninstallException)
{
    entry.MarkManualOnly();
}

Prevention

When it happens

Trigger: The ApplicationEntry's UninstallString is null/empty/whitespace, so the code never enters the string-parsing branch and falls to the 'Cant do shit, capt'n' throw. Typical for entries that expose a 'Modify'/'Repair' only, or for orphaned registry entries left behind by a prior uninstall.

Common situations: An entry is a leftover registry key with no UninstallString; the entry only has a DisplayIcon/InstallLocation; a per-machine entry was partially cleaned and lost its UninstallString value.

Related errors


AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13). Data as JSON: /api/errors/61a55879cbc16510. Report an issue: GitHub.