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

  1. Select a different startup entry that has a real file path before opening file location.
  2. Manually locate the file using the displayed Command string.
  3. 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

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


AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13). Data as JSON: /api/errors/dcf32ca7c6ddb5f3. Report an issue: GitHub.