BCUninstaller/Bulk-Crap-Uninstaller · error · FormatException
Missing ID parameter for what to uninstall
Error message
Missing ID parameter for what to uninstall
What it means
A FormatException raised after parsing when `_queryType == QueryType.Uninstall` but `_appId` is still null. Uninstall requires a target identifier; without it the operation is ambiguous and is rejected before any uninstall logic runs.
Source
Thrown at source/ScriptHelper/Program.cs:93
break;
case @"l":
case @"list":
if (_queryType != QueryType.None) throw new FormatException(@"Multiple commands specified");
_queryType = QueryType.List;
break;
default:
if (_appId != null) throw new FormatException(@"Too many parameters");
_appId = arg;
break;
}
}
if (_queryType == QueryType.None)
throw new FormatException(@"No commands specified");
if (_queryType == QueryType.Uninstall && _appId == null)
throw new FormatException(@"Missing ID parameter for what to uninstall");
}
private enum QueryType
{
None,
Uninstall,
List,
}
}
}View on GitHub (pinned to 608321de98)
Solutions
- Supply the app identifier after the uninstall command: `ScriptHelper uninstall <id>`.
- Check that the id variable is non-empty in the calling script before invoking.
- Fall back to `ScriptHelper list` first to obtain the correct id.
Example fix
// before ScriptHelper uninstall // after ScriptHelper uninstall 123
Defensive patterns
Strategy: validation
Validate before calling
if (command == "uninstall" && string.IsNullOrWhiteSpace(appId))
throw new ArgumentException("Uninstall requires an app id."); Try / catch
try { /* invoke ScriptHelper uninstall */ }
catch (FormatException ex) when (ex.Message.Contains("Missing ID"))
{ /* resolve the id first (e.g. via list) then retry */ } Prevention
- Resolve and verify the app id before issuing an uninstall.
- Use `list` to discover ids when the target is unknown.
- Fail the caller early when the id variable is empty.
When it happens
Trigger: Running `ScriptHelper uninstall` with no positional app identifier following the command token.
Common situations: Caller script that builds the uninstall command from a variable that was empty/null; forgetting to append the id after the verb.
Related errors
- Too many parameters
- No commands specified
- Multiple commands specified
- ERROR_BAD_ARGUMENTS
- Argument {argument} has already been defined
AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13).
Data as JSON: /api/errors/93855638768f28a7.
Report an issue: GitHub.