{"record":{"id":"b52e38f0c759e8b0","repo":"BCUninstaller/Bulk-Crap-Uninstaller","slug":"failed-to-detect-your-steam-installation-launch-s","errorCode":null,"errorMessage":"Failed to detect your Steam installation. Launch Steam, exit it gracefully, and try again.","messagePattern":"Failed to detect your Steam installation\\. Launch Steam, exit it gracefully, and try again\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"source/SteamHelper/SteamInstallation.cs","lineNumber":88,"sourceCode":"                        return path;\r\n                }\r\n            }\r\n\r\n            try\r\n            {\r\n                using (var key = Registry.LocalMachine.OpenSubKey(@\"SOFTWARE\\Classes\\steam\\Shell\\Open\\Command\"))\r\n                {\r\n                    var command = key?.GetStringSafe(null);\r\n                    var path = Path.GetDirectoryName(Misc.SeparateArgsFromCommand(command).Key);\r\n\r\n                    if (path != null && Directory.Exists(path))\r\n                        return path;\r\n                }\r\n                throw new IOException();\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                throw new IOException(\r\n                    \"Failed to detect your Steam installation. Launch Steam, exit it gracefully, and try again.\", ex);\r\n            }\r\n        }\r\n    }\r\n}","sourceCodeStart":70,"sourceCodeEnd":93,"githubUrl":"https://github.com/BCUninstaller/Bulk-Crap-Uninstaller/blob/608321de98e92297377b1eb69029af55c25504a1/source/SteamHelper/SteamInstallation.cs#L70-L93","documentation":"An IOException thrown by `SteamInstallation.FindSteamInstallationLocation` when Steam's install path cannot be determined from the Windows registry. The code tries `SOFTWARE\\Valve\\Steam` and its WOW6432Node mirror for an `InstallPath` value, then falls back to the `steam://` shell-open command registry key. If none yields an existing directory, an IOException is raised (wrapping any inner exception) telling the user to launch Steam, exit it gracefully, and retry so the registry is populated.","triggerScenarios":"Steam is not installed; Steam was installed but never run so registry keys are absent; portable Steam that never wrote registry entries; registry keys were deleted by a cleaner tool; running on a non-Windows platform or under an account without registry read access.","commonSituations":"Fresh machine where Steam installer ran but Steam was never launched; user uninstalled Steam leaving stale/partial registry; registry cleaner removed the Valve keys; permission/privilege issues reading HKLM.","solutions":["Install Steam from the official site and launch it once so it writes registry keys.","If already installed, launch Steam, wait for it to fully start, then exit it gracefully and retry.","Verify the registry key `HKLM\\SOFTWARE\\Valve\\Steam` (or WOW6432Node variant) has a valid `InstallPath`.","Reinstall Steam if the registry keys are missing or point to a non-existent directory."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Check registry presence before relying on SteamInstallation.\nusing var key = Registry.LocalMachine.OpenSubKey(@\"SOFTWARE\\Valve\\Steam\");\nvar installPath = key?.GetValue(\"InstallPath\") as string;\nif (string.IsNullOrEmpty(installPath) || !Directory.Exists(installPath))\n    /* warn user Steam is not detected; prompt to install/launch */","typeGuard":null,"tryCatchPattern":"try { var steam = SteamInstallation.Instance; }\ncatch (IOException ex) when (ex.Message.Contains(\"Failed to detect your Steam installation\"))\n{ /* prompt user to install/launch Steam, then retry or disable Steam features */ }","preventionTips":["Detect Steam via registry before invoking Steam-dependent features.","Offer a graceful fallback (skip Steam apps) when Steam is absent.","Launch Steam once after install to ensure registry is populated."],"tags":["steam","registry","detection","environment","steamhelper"],"backgroundTag":null,"analyzedSha":"608321de98e92297377b1eb69029af55c25504a1","analyzedAt":"2026-08-13T12:17:35.389Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}