BCUninstaller/Bulk-Crap-Uninstaller · warning · IOException
Invalid path {item.Command}
Error message
Invalid path
{item.Command} What it means
An IOException thrown in `StartupManagerWindow.openFileLocationToolStripMenuItem_Click` when the selected startup entry's `CommandFilePath` is null. The handler tries to open Explorer focused on the entry's command file; without a resolved file path there is nothing to open, so it raises 'Invalid path' concatenated with the raw `Command` string. The exception is caught locally and shown as a security-or-generic error dialog.
Source
Thrown at source/UninstallTools/Dialogs/StartupManagerWindow.cs:222
}
}
private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (listView1.SelectedItems.Count > 0 && listView1.FocusedItem.Bounds.Contains(e.Location))
{
openFileLocationToolStripMenuItem_Click(sender, e);
}
}
private void openFileLocationToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (var item in Selection)
{
try
{
if (item.CommandFilePath == null)
throw new IOException(Localisation.Error_InvalidPath + "\n" + item.Command);
WindowsTools.OpenExplorerFocusedOnObject(item.CommandFilePath);
}
catch (Exception ex)
{
ShowSecurityOrGenericError(ex, "opening file location", $"Path: {item.CommandFilePath}");
}
}
}
private void openLinkLocationToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
StartupManager.OpenStartupEntryLocations(Selection);
}
catch (Exception ex)
{
ShowSecurityOrGenericError(ex, "opening link location");
View on GitHub (pinned to 608321de98)
Solutions
- Select a different startup entry that has a real file path before opening file location.
- Manually locate the file using the displayed Command string.
- If the entry is stale (target deleted), remove the startup entry instead of opening its location.
Defensive patterns
Strategy: type-guard
Validate before calling
// Guard before calling open-file-location.
if (string.IsNullOrEmpty(item.CommandFilePath)) { /* show 'no file path' message, skip */ return; } Type guard
bool HasResolvablePath(StartupEntry item) => !string.IsNullOrEmpty(item.CommandFilePath);
Try / catch
try { WindowsTools.OpenExplorerFocusedOnObject(item.CommandFilePath); }
catch (IOException ex) when (ex.Message.StartsWith(Localisation.Error_InvalidPath))
{ /* show 'path could not be resolved' and skip this entry */ } Prevention
- Check CommandFilePath is non-null before offering 'open file location'.
- Disable the context-menu action for entries without a file path.
- Treat non-file startup entries (URIs, packaged apps) as un-openable.
When it happens
Trigger: Right-clicking a startup entry whose command line could not be resolved to a file path (e.g. a registry Run value pointing to a UWP app, a shell alias, a scheduled-task reference, or a command whose target executable no longer exists).
Common situations: Startup entries that are not file-based (e.g. `ms-settings:` URIs, packaged apps, WMI-activated tasks); entries where the resolver failed to extract a path; deleted executables referenced by a leftover Run key.
Related errors
- Failed to get MainModule Directory
- File not found.
- Unknown range
- Not a Windows .exe file.
- Win32_Directory.Compress returned {ret}
AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13).
Data as JSON: /api/errors/dcf32ca7c6ddb5f3.
Report an issue: GitHub.