Best Answer overlord , 29 June 2015 - 18:06
Ok so I updated the code to look like this:
function SoftFailureProcessRunning(hMSI)
NUMBER nvSize, nvType;
STRING svRegKey; // key to search for
STRING svRegValue; // captured value from the registry key
begin
RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
nvType = REGDB_STRING;
nvSize = 256;
svRegKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\excel.exe";
RegDBGetKeyValueEx(svRegKey, "Path", nvType, svRegValue, nvSize);
if (Is(FILE_LOCKED, svRegValue ^ "excel.exe")) then
MessageBox("This installation proccess cannot continue while Excel.exe is running. Click OK to close Excel", WARNING);
else
MessageBox( "Process not running", WARNING);
endif;
end;
That seems to properly detect it running without issues.
Go to the full post


