BCUninstaller/Bulk-Crap-Uninstaller · error · Exception
The system cannot find the file specified. Indicates that th
Error message
The system cannot find the file specified. Indicates that the file can not be found in specified location.
What it means
In the exit-code switch, exitVar == 2 maps to a thrown Exception with the Win32 ERROR_FILE_NOT_FOUND description. The spawned uninstaller/launcher process exited with code 2, meaning the executable or a file it needs could not be found at the specified location.
Source
Thrown at source/UninstallTools/Uninstaller/BulkUninstallEntry.cs:437
exitVar == 1)
{
// 1 - Installation aborted by user (cancel button)
_skipLevel = SkipCurrentLevel.Skip;
}
else if (exitVar == -1073741510)
{
/* 3221225786 / 0xC000013A / -1073741510
The application terminated as a result of a CTRL+C.
Indicates that the application has been terminated either by user's
keyboard input CTRL+C or CTRL+Break or closing command prompt window. */
_skipLevel = SkipCurrentLevel.Terminate;
}
else
{
switch (exitVar)
{
case 2:
throw new Exception("The system cannot find the file specified. Indicates that the file can not be found in specified location.");
case 3:
throw new Exception("The system cannot find the path specified. Indicates that the specified path can not be found.");
case 5:
throw new Exception("Access is denied. Indicates that user has no access right to specified resource.");
case 9009:
throw new Exception("Program is not recognized as an internal or external command, operable program or batch file.");
case -2147024846:
throw new Exception("0x80070032 - This app is part of Windows and cannot be uninstalled on a per-user basis.");
default:
if (options.RetryFailedQuiet || (UninstallerEntry.UninstallerKind == UninstallerType.Nsis && !options.PreferQuiet))
retry = true;
throw new IOException(Localisation.UninstallError_UninstallerReturnedCode + exitVar);
}
}
}
}
}
View on GitHub (pinned to 608321de98)
Solutions
- Validate the target path with File.Exists before launching; if missing, fall back to the registry 'Modify' path or mark the entry for manual removal.
- Quote/escape the UninstallString correctly (split executable from args) — see UpdateNsisStartInfo for the pattern.
- Resolve environment variables and short (8.3) names in the path before launching.
Example fix
// before
var p = Process.Start(startInfo);
// after
var exe = ExtractExecutablePath(startInfo.FileName);
if (!File.Exists(exe))
throw new InvalidOperationException($"Uninstaller binary not found: {exe}");
var p = Process.Start(startInfo); Defensive patterns
Strategy: validation
Validate before calling
var exe = ExtractExecutablePath(entry.UninstallString);
if (!File.Exists(exe))
{
entry.MarkManualOnly($"Uninstaller binary not found: {exe}");
return;
}
manager.RunUninstaller(entry, options); Type guard
null
Try / catch
null
Prevention
- Resolve the executable token to an absolute path before launching.
- Quote paths with spaces to avoid truncation when scraping UninstallString.
- Fall back to the registry 'Modify' path when the primary uninstaller is missing.
When it happens
Trigger: Process.Start launched a command line whose target file (or first token) does not exist, and the OS returned exit code 2. The UninstallString pointed to a binary that was already deleted, moved, or referenced by a stale path.
Common situations: The uninstaller binary was removed by a previous cleanup; the path uses an environment variable that is unset in the spawned context; the entry's UninstallString was scraped from registry with an unquoted path containing spaces that got truncated.
Related errors
- The system cannot find the path specified. Indicates that th
- Failed to enable this entry, the following file was not foun
- Access is denied. Indicates that user has no access right to
- Program is not recognized as an internal or external command
- 0x80070032 - This app is part of Windows and cannot be unins
AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13).
Data as JSON: /api/errors/c92ae741e2f7ea1e.
Report an issue: GitHub.