{"record":{"id":"dcf32ca7c6ddb5f3","repo":"BCUninstaller/Bulk-Crap-Uninstaller","slug":"invalid-path-item-command","errorCode":null,"errorMessage":"Invalid path\n{item.Command}","messagePattern":"Invalid path\n(.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"warning","filePath":"source/UninstallTools/Dialogs/StartupManagerWindow.cs","lineNumber":222,"sourceCode":"            }\r\n        }\r\n\r\n        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)\r\n        {\r\n            if (listView1.SelectedItems.Count > 0 && listView1.FocusedItem.Bounds.Contains(e.Location))\r\n            {\r\n                openFileLocationToolStripMenuItem_Click(sender, e);\r\n            }\r\n        }\r\n\r\n        private void openFileLocationToolStripMenuItem_Click(object sender, EventArgs e)\r\n        {\r\n            foreach (var item in Selection)\r\n            {\r\n                try\r\n                {\r\n                    if (item.CommandFilePath == null)\r\n                        throw new IOException(Localisation.Error_InvalidPath + \"\\n\" + item.Command);\r\n                    WindowsTools.OpenExplorerFocusedOnObject(item.CommandFilePath);\r\n                }\r\n                catch (Exception ex)\r\n                {\r\n                    ShowSecurityOrGenericError(ex, \"opening file location\", $\"Path: {item.CommandFilePath}\");\r\n                }\r\n            }\r\n        }\r\n\r\n        private void openLinkLocationToolStripMenuItem_Click(object sender, EventArgs e)\r\n        {\r\n            try\r\n            {\r\n                StartupManager.OpenStartupEntryLocations(Selection);\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                ShowSecurityOrGenericError(ex, \"opening link location\");\r","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/blob/608321de98e92297377b1eb69029af55c25504a1/source/UninstallTools/Dialogs/StartupManagerWindow.cs#L204-L240","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// Guard before calling open-file-location.\nif (string.IsNullOrEmpty(item.CommandFilePath)) { /* show 'no file path' message, skip */ return; }","typeGuard":"bool HasResolvablePath(StartupEntry item) => !string.IsNullOrEmpty(item.CommandFilePath);","tryCatchPattern":"try { WindowsTools.OpenExplorerFocusedOnObject(item.CommandFilePath); }\ncatch (IOException ex) when (ex.Message.StartsWith(Localisation.Error_InvalidPath))\n{ /* show 'path could not be resolved' and skip this entry */ }","preventionTips":["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."],"tags":["ui","startup-manager","filesystem","uninstalltools"],"backgroundTag":null,"analyzedSha":"608321de98e92297377b1eb69029af55c25504a1","analyzedAt":"2026-08-13T12:17:35.389Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}