BCUninstaller/Bulk-Crap-Uninstaller · error · Exception

The system cannot find the path specified. Indicates that th

Error message

The system cannot find the path specified. Indicates that the specified path can not be found.

What it means

The exit-code switch maps exitVar == 3 to a thrown Exception describing ERROR_PATH_NOT_FOUND. The launched process exited with code 3, meaning the directory component of the command line could not be located, even if the file token itself looked valid.

Source

Thrown at source/UninstallTools/Uninstaller/BulkUninstallEntry.cs:439

                                // 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);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)

View on GitHub (pinned to 608321de98)

Solutions

  1. Set ProcessStartInfo.WorkingDirectory to the uninstaller's install folder (Path.GetDirectoryName of the exe) before launching.
  2. Verify Directory.Exists on any path arguments and on the install location before launching.
  3. If the install folder is gone, treat the entry as already-uninstalled and clean up its registry registration instead.

Example fix

// before
startInfo.FileName = uninstallString;
var p = Process.Start(startInfo);

// after
startInfo.FileName = exe;
startInfo.WorkingDirectory = Path.GetDirectoryName(exe) ?? string.Empty;
if (!Directory.Exists(startInfo.WorkingDirectory))
    throw new InvalidOperationException("Install folder missing.");
var p = Process.Start(startInfo);
Defensive patterns

Strategy: validation

Validate before calling

var dir = Path.GetDirectoryName(exe) ?? string.Empty;
if (!Directory.Exists(dir))
{
    entry.MarkManualOnly($"Install folder missing: {dir}");
    return;
}
startInfo.WorkingDirectory = dir;
manager.RunUninstaller(entry, options);

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: The uninstaller's working directory or a path argument references a directory that does not exist — e.g. a relative path resolved against the wrong cwd, or an absolute path whose drive/folder was removed.

Common situations: WorkingDirectory not set and the uninstaller expects to run from its install folder which is gone; an argument embeds a path to a folder deleted during partial uninstall; the install lives on a removable/network drive that is no longer present.

Related errors


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