{"record":{"id":"d64bf1ebec8b8837","repo":"BCUninstaller/Bulk-Crap-Uninstaller","slug":"the-system-cannot-find-the-path-specified-indicat","errorCode":null,"errorMessage":"The system cannot find the path specified. Indicates that the specified path can not be found.","messagePattern":"The system cannot find the path specified\\. Indicates that the specified path can not be found\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"source/UninstallTools/Uninstaller/BulkUninstallEntry.cs","lineNumber":439,"sourceCode":"                                // 1 - Installation aborted by user (cancel button)\r\n                                _skipLevel = SkipCurrentLevel.Skip;\r\n                            }\r\n                            else if (exitVar == -1073741510)\r\n                            {\r\n                                /* 3221225786 / 0xC000013A / -1073741510 \r\n                                    The application terminated as a result of a CTRL+C. \r\n                                    Indicates that the application has been terminated either by user's \r\n                                    keyboard input CTRL+C or CTRL+Break or closing command prompt window. */\r\n                                _skipLevel = SkipCurrentLevel.Terminate;\r\n                            }\r\n                            else\r\n                            {\r\n                                switch (exitVar)\r\n                                {\r\n                                    case 2:\r\n                                        throw new Exception(\"The system cannot find the file specified. Indicates that the file can not be found in specified location.\");\r\n                                    case 3:\r\n                                        throw new Exception(\"The system cannot find the path specified. Indicates that the specified path can not be found.\");\r\n                                    case 5:\r\n                                        throw new Exception(\"Access is denied. Indicates that user has no access right to specified resource.\");\r\n                                    case 9009:\r\n                                        throw new Exception(\"Program is not recognized as an internal or external command, operable program or batch file.\");\r\n                                    case -2147024846:\r\n                                        throw new Exception(\"0x80070032 - This app is part of Windows and cannot be uninstalled on a per-user basis.\");\r\n\r\n                                    default:\r\n                                        if (options.RetryFailedQuiet || (UninstallerEntry.UninstallerKind == UninstallerType.Nsis && !options.PreferQuiet))\r\n                                            retry = true;\r\n                                        throw new IOException(Localisation.UninstallError_UninstallerReturnedCode + exitVar);\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/blob/608321de98e92297377b1eb69029af55c25504a1/source/UninstallTools/Uninstaller/BulkUninstallEntry.cs#L421-L457","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set ProcessStartInfo.WorkingDirectory to the uninstaller's install folder (Path.GetDirectoryName of the exe) before launching.","Verify Directory.Exists on any path arguments and on the install location before launching.","If the install folder is gone, treat the entry as already-uninstalled and clean up its registry registration instead."],"exampleFix":"// before\nstartInfo.FileName = uninstallString;\nvar p = Process.Start(startInfo);\n\n// after\nstartInfo.FileName = exe;\nstartInfo.WorkingDirectory = Path.GetDirectoryName(exe) ?? string.Empty;\nif (!Directory.Exists(startInfo.WorkingDirectory))\n    throw new InvalidOperationException(\"Install folder missing.\");\nvar p = Process.Start(startInfo);","handlingStrategy":"validation","validationCode":"var dir = Path.GetDirectoryName(exe) ?? string.Empty;\nif (!Directory.Exists(dir))\n{\n    entry.MarkManualOnly($\"Install folder missing: {dir}\");\n    return;\n}\nstartInfo.WorkingDirectory = dir;\nmanager.RunUninstaller(entry, options);","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Set ProcessStartInfo.WorkingDirectory to the uninstaller's install folder.","Verify Directory.Exists on path arguments before launching.","Treat a missing install folder as 'already uninstalled' and clean up the registration."],"tags":["uninstaller","process-exit-code","path-not-found","exit-code-3","windows"],"backgroundTag":null,"analyzedSha":"608321de98e92297377b1eb69029af55c25504a1","analyzedAt":"2026-08-13T12:17:35.389Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}