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

  1. Correct the path in the saved custom command.
  2. Use an absolute path to the executable.
  3. Ensure the referenced tool is actually installed on this machine.
  4. 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

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


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