BCUninstaller/Bulk-Crap-Uninstaller · error · IOException
File not found.
Error message
File not found.
What it means
RunExternalCommands splits a user-supplied block of custom commands into lines and, for each line, resolves the executable path with Path.GetFullPath. If the executable does not exist on disk after resolution, this IOException (Error_FileNotFound) is thrown and shown in a message box naming the failing command.
Source
Thrown at source/BulkCrapUninstaller/Functions/AppUninstaller.cs:656
Monitor.Exit(_uninstallLock);
}
private static void RunExternalCommands(string commands, LoadingDialogInterface controller)
{
var lines = commands.SplitNewlines(StringSplitOptions.RemoveEmptyEntries);
controller.SetMaximum(lines.Length);
for (var i = 0; i < lines.Length; i++)
{
controller.SetProgress(i);
var line = lines[i];
try
{
var filename = ProcessTools.SeparateArgsFromCommand(line);
filename.FileName = Path.GetFullPath(filename.FileName);
if (!File.Exists(filename.FileName))
throw new IOException(Localisable.Error_FileNotFound);
filename.ToProcessStartInfo().StartAndWait();
}
catch (Exception ex)
{
MessageBox.Show(string.Format(Localisable.MessageBoxes_ExternalCommandFailed_Message, line)
+ Localisable.MessageBoxes_Error_details + ex.Message,
Localisable.MessageBoxes_ExternalCommandFailed_Title,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
/// <summary>
/// Attempt to get the lock and display error popup if the process fails.
/// </summary>
/// <returns>True if lock was succesfully acquired, otherwise false.</returns>
private bool TryGetUninstallLock()
{
View on GitHub (pinned to 608321de98)
Solutions
- Correct the path in the saved custom command.
- Use an absolute path to the executable.
- Ensure the referenced tool is actually installed on this machine.
- Expand any environment variables before saving the command.
Example fix
// before mytool.exe /clean // after C:\Tools\mytool.exe /clean
Defensive patterns
Strategy: validation
Validate before calling
if (!File.Exists(Path.GetFullPath(cmd.FileName)))
/* report missing executable before starting */ Prevention
- Use absolute paths for external commands.
- Expand environment variables before saving commands.
- Verify referenced tools are installed before running.
When it happens
Trigger: A custom external command references an executable that is misspelled, relative to an unexpected working directory, or no longer installed; environment variables in the path were not expanded.
Common situations: Typo in the command path; the tool was moved or uninstalled; a relative path resolved against the wrong cwd; %VAR% not expanded.
Related errors
- Failed to get MainModule Directory
- Unknown range
- Not a Windows .exe file.
- Win32_Directory.Compress returned {ret}
- Path does not point to a valid .reg file
AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13).
Data as JSON: /api/errors/efc839e7abef6970.
Report an issue: GitHub.