{"record":{"id":"b2b359c3c2500e6b","repo":"BCUninstaller/Bulk-Crap-Uninstaller","slug":"no-updateid-specified","errorCode":null,"errorMessage":"No UpdateID specified","messagePattern":"No UpdateID specified","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"warning","filePath":"source/WinUpdateHelper/Program.cs","lineNumber":102,"sourceCode":"                        if (_queryType != QueryType.None) throw new ArgumentException(@\"Multiple commands specified\");\r\n                        _queryType = QueryType.List;\r\n                        break;\r\n\r\n                    default:\r\n                        if (_queryType != QueryType.Uninstall)\r\n                            throw new ArgumentException($@\"Unknown argument: {arg}\");\r\n                        if (_updateId != null)\r\n                            throw new ArgumentException(@\"Multiple UpdateIDs specified\");\r\n                        _updateId = arg;\r\n                        break;\r\n                }\r\n            }\r\n\r\n            if (_queryType == QueryType.None)\r\n                throw new ArgumentException(@\"No commands specified\");\r\n\r\n            if (_queryType == QueryType.Uninstall && _updateId == null)\r\n                throw new ArgumentException(@\"No UpdateID specified\");\r\n        }\r\n\r\n        private enum QueryType\r\n        {\r\n            None,\r\n            Uninstall,\r\n            List\r\n        }\r\n    }\r\n}","sourceCodeStart":84,"sourceCodeEnd":112,"githubUrl":"https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/blob/608321de98e92297377b1eb69029af55c25504a1/source/WinUpdateHelper/Program.cs#L84-L112","documentation":"ArgumentException thrown after the argument loop when _queryType is Uninstall but _updateId is still null. The uninstall command requires an UpdateID operand; omitting it is an error.","triggerScenarios":"Running 'uninstall' or 'u' with no following UpdateID token. The ID token was consumed/rejected before reaching the assignment (e.g. it matched a command word by accident).","commonSituations":"User runs 'WinUpdateHelper uninstall' expecting a prompt. A wrapper passes the command but not the ID due to an empty variable. Whitespace-only ID that collapses to nothing.","solutions":["Supply the UpdateID immediately after the uninstall command.","In a wrapper, assert the ID variable is non-empty before building the command line.","Run 'list' first to obtain valid UpdateIDs if unsure of the value."],"exampleFix":"// before\nWinUpdateHelper.exe uninstall\n// after\nWinUpdateHelper.exe uninstall 12345678-1234-1234-1234-1234567890ab","handlingStrategy":"validation","validationCode":"var lower = args.Select(a => a.ToLowerInvariant()).ToList();\nif (lower.Contains(\"u\") || lower.Contains(\"uninstall\"))\n    if (args.Length < 2) throw new ArgumentException(\"No UpdateID specified\");","typeGuard":"bool HasUninstallId(IList<string> args)\n{\n    var i = args.Select((a,idx) => (a.ToLowerInvariant(), idx))\n        .FirstOrDefault(t => t.Item1 == \"u\" || t.Item1 == \"uninstall\").Item2;\n    return i >= 0 && i + 1 < args.Count && !string.IsNullOrWhiteSpace(args[i + 1]);\n}","tryCatchPattern":null,"preventionTips":["Always pass an UpdateID after the uninstall command.","In wrappers, assert the ID variable is non-empty before building the command line.","Use 'list' to discover valid IDs first."],"tags":["cli","argument-validation","windows-update","wu"],"backgroundTag":null,"analyzedSha":"608321de98e92297377b1eb69029af55c25504a1","analyzedAt":"2026-08-13T12:17:35.389Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}