Fix issue inspecting/browsing executables running from faulty ramdisk software
@@ -484,13 +484,20 @@ INT_PTR CALLBACK PhpProcessGeneralDlgProc(
{
if (processItem->FileName)
{
+ PPH_STRING fileName;
+
+ // Note: Workaround for buggy RamDisk software.
+ fileName = PhGetFileName(processItem->FileName);
+
PhShellExecuteUserString(
hwndDlg,
L"ProgramInspectExecutables",
- processItem->FileName->Buffer,
+ fileName->Buffer,
FALSE,
L"Make sure the PE Viewer executable file is present."
);
+
+ PhDereferenceObject(fileName);
}
}
break;
@@ -498,13 +505,20 @@ INT_PTR CALLBACK PhpProcessGeneralDlgProc(
{
if (processItem->FileName)
{
+ PPH_STRING fileName;
+
+ // Note: Workaround for buggy RamDisk software.
+ fileName = PhGetFileName(processItem->FileName);
+
PhShellExecuteUserString(
hwndDlg,
L"FileBrowseExecutable",
- processItem->FileName->Buffer,
+ fileName->Buffer,
FALSE,
L"Make sure the Explorer executable file is present."
);
+
+ PhDereferenceObject(fileName);
}
}
break;
