{"record":{"id":"53bcf64d916bc1e2","repo":"lucasg/Dependencies","slug":"peview-exe-file-could-not-be-found","errorCode":null,"errorMessage":"peview.exe file could not be found !","messagePattern":"peview\\.exe file could not be found !","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"DependenciesGui/Models/ModuleInfo.cs","lineNumber":405,"sourceCode":"                }\n\n                return _OpenPeviewerCommand;\n            }\n        }\n\n        public bool OpenPeviewer(object Module)\n        {\n            string programPath = Dependencies.Properties.Settings.Default.PeViewerPath;\n            Process PeviewerProcess = new Process();\n        \n            if ((Module == null))\n            {\n                return false;\n            }\n\n            if (!File.Exists(programPath))\n            {\n                MessageBox.Show(\"peview.exe file could not be found !\");\n                return false;\n            }\n\n            string Filepath = (Module as DisplayModuleInfo).GetPathDisplayName(true);\n            if (Filepath == null)\n            {\n                return false;\n            }\n\n            PeviewerProcess.StartInfo.FileName = programPath;\n            PeviewerProcess.StartInfo.Arguments = Filepath;\n            return PeviewerProcess.Start();\n        }\n\n        public RelayCommand OpenNewAppCommand\n        {\n            get\n            {","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/lucasg/Dependencies/blob/1997a40000b77bd3326cbc33672a7b9f78bb23f3/DependenciesGui/Models/ModuleInfo.cs#L387-L423","documentation":"This is a WPF MessageBox dialog (not a thrown exception) shown by DisplayModuleInfo.OpenPeviewer. Dependencies launches the external peview.exe (from Process Hacker) to inspect a PE module; its on-disk location is read from the PeViewerPath user setting. When File.Exists(programPath) is false, the user is told the binary is missing and the method returns false without launching anything.","triggerScenarios":"Calling OpenPeviewer (e.g. the 'open in peview' context command / double-clicking a module in the tree) while Dependencies.Properties.Settings.Default.PeViewerPath is empty, unset, or points to a path that no longer exists on disk.","commonSituations":"Portable/fresh install where the Deploy-Dependencies.ps1 step never downloaded peview.exe; the pinned download hash in the deploy script drifted so extraction was skipped; the user moved or deleted the binary; PeViewerPath still holds a stale default after an upgrade.","solutions":["Open Dependencies Settings and set PeViewerPath to the real peview.exe location (or use the file picker), then restart.","Re-run Deploy-Dependencies.ps1 / Get-DependenciesDeps so peview.exe is downloaded and PEVIEW_PATH is populated.","Verify the binary is actually on disk at the configured path (File.Exists) and that the path is absolute.","If the deploy hash check failed, update $PeviewBuildHash in Deploy-Dependencies.ps1 to the current Process Hacker artifact hash."],"exampleFix":"// before\nstring programPath = Dependencies.Properties.Settings.Default.PeViewerPath;\nif (!File.Exists(programPath))\n{\n    MessageBox.Show(\"peview.exe file could not be found !\");\n    return false;\n}\n\n// after - let the user locate it and persist the choice\nstring programPath = Dependencies.Properties.Settings.Default.PeViewerPath;\nif (string.IsNullOrWhiteSpace(programPath) || !File.Exists(programPath))\n{\n    var dlg = new Microsoft.Win32.OpenFileDialog { Filter = \"peview.exe|peview.exe\" };\n    if (dlg.ShowDialog() != true) return false;\n    programPath = dlg.FileName;\n    Dependencies.Properties.Settings.Default.PeViewerPath = programPath;\n    Dependencies.Properties.Settings.Default.Save();\n}","handlingStrategy":"validation","validationCode":"string programPath = Dependencies.Properties.Settings.Default.PeViewerPath;\nif (string.IsNullOrWhiteSpace(programPath) || !File.Exists(programPath))\n{\n    // do not call OpenPeviewer / prompt the user to set PeViewerPath first\n    return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the deploy/download step so peview.exe is bundled next to Dependencies.exe.","Persist PeViewerPath as an absolute path in Settings and validate it on startup.","Expose a Settings file picker so users can repair a broken path without editing config by hand."],"tags":["peviewer","settings","file-not-found","wpf","gui"],"backgroundTag":null,"analyzedSha":"1997a40000b77bd3326cbc33672a7b9f78bb23f3","analyzedAt":"2026-08-13T18:14:41.696Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}