{"record":{"id":"61a55879cbc16510","repo":"BCUninstaller/Bulk-Crap-Uninstaller","slug":"there-is-no-valid-way-of-uninstalling-this-entry","errorCode":null,"errorMessage":"There is no valid way of uninstalling this entry","messagePattern":"There is no valid way of uninstalling this entry","errorType":"exception","errorClass":"NoWayToUninstallException","httpStatus":null,"severity":"error","filePath":"source/UninstallTools/Uninstaller/UninstallManager.cs","lineNumber":115,"sourceCode":"                {\r\n                    // Fall back to the non-quiet uninstaller\r\n                    try\r\n                    {\r\n                        startInfo = ProcessTools.SeparateArgsFromCommand(entry.UninstallString).ToProcessStartInfo();\r\n                        Debug.Assert(!startInfo.FileName.Contains(' ') || File.Exists(startInfo.FileName));\r\n\r\n                        if (entry.UninstallerKind == UninstallerType.Nsis && !safeMode)\r\n                            UpdateNsisStartInfo(startInfo, entry.DisplayName);\r\n                    }\r\n                    catch (FormatException)\r\n                    {\r\n                        fallBack = entry.UninstallString;\r\n                    }\r\n                }\r\n                else\r\n                {\r\n                    // Cant do shit, capt'n\r\n                    throw new NoWayToUninstallException();\r\n                }\r\n\r\n                if (simulate)\r\n                {\r\n                    Thread.Sleep(SimulationDelay);\r\n                    if (Debugger.IsAttached && new Random().Next(0, 2) == 0)\r\n                        throw new IOException(\"Random failure for debugging\");\r\n                    return null;\r\n                }\r\n\r\n                if (fallBack != null)\r\n                    return Process.Start(new ProcessStartInfo(fallBack) { UseShellExecute = true });\r\n\r\n                if (startInfo != null)\r\n                {\r\n                    startInfo.UseShellExecute = true;\r\n                    return Process.Start(startInfo);\r\n                }\r","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/blob/608321de98e92297377b1eb69029af55c25504a1/source/UninstallTools/Uninstaller/UninstallManager.cs#L97-L133","documentation":"UninstallManager throws NoWayToUninstallException in the branch where the entry has no usable UninstallString to parse (the 'else' after attempting to build startInfo from the uninstall string). The harness cannot construct a process to launch, so it gives up with this domain exception rather than a NullReferenceException downstream.","triggerScenarios":"The ApplicationEntry's UninstallString is null/empty/whitespace, so the code never enters the string-parsing branch and falls to the 'Cant do shit, capt'n' throw. Typical for entries that expose a 'Modify'/'Repair' only, or for orphaned registry entries left behind by a prior uninstall.","commonSituations":"An entry is a leftover registry key with no UninstallString; the entry only has a DisplayIcon/InstallLocation; a per-machine entry was partially cleaned and lost its UninstallString value.","solutions":["Pre-filter the list to exclude entries whose UninstallString is null/whitespace, or disable the uninstall action for them.","Offer an alternative action: 'Open Install Location' (using InstallLocation) or a manual registry-junk cleanup.","Catch NoWayToUninstallException and mark the entry as 'manual uninstall only' so the bulk run continues."],"exampleFix":"// before\nvar p = manager.CreateUninstallProcess(entry, options);\n\n// after\nif (string.IsNullOrWhiteSpace(entry.UninstallString))\n{\n    entry.MarkManualOnly(\"No uninstall command available.\");\n    return null;\n}\nvar p = manager.CreateUninstallProcess(entry, options);","handlingStrategy":"validation","validationCode":"if (string.IsNullOrWhiteSpace(entry.UninstallString))\n{\n    entry.MarkManualOnly(\"No uninstall command available.\");\n    return;\n}\nmanager.CreateUninstallProcess(entry, options);","typeGuard":"null","tryCatchPattern":"try { manager.CreateUninstallProcess(entry, options); }\ncatch (NoWayToUninstallException)\n{\n    entry.MarkManualOnly();\n}","preventionTips":["Exclude entries without an UninstallString from the bulk uninstall set.","Offer 'Open Install Location' as an alternative for entries with only InstallLocation.","Catch NoWayToUninstallException so a single bad entry does not abort the bulk run."],"tags":["uninstaller","no-way-to-uninstall","domain-exception","registry-leftover","validation"],"backgroundTag":null,"analyzedSha":"608321de98e92297377b1eb69029af55c25504a1","analyzedAt":"2026-08-13T12:17:35.389Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}