So looks like I might have to try Stefan's suggestion here is a cross post to the flexera forums where someone encountered the same issue I am seeing: https://community.fl...p?t-188807.html
Even specifying the 64bit psapi.dll still addresses the 32bit space unless you disable the redirection which apprently does not work within the confines of the custom action without throwing some errors.
I will post an update with the results of my attempt with is FILE_LOCKED again
So I added a system search for "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\excel.exe" - "Path"
to grab the install path for excel.
Then I used the following code to check for file_locked:
nvSize = 256;
MsiGetProperty (hMSI, "EXCEL_PATH", svFilePath, nvSize);
if (Is(FILE_LOCKED, svFilePath ^ "excel.exe")) then
MessageBox("found it finally", WARNING);
MessageBox( svFilePath ^ "excel.exe", WARNING);
The problem is that svFilePath is empty even though I can go look in the registry at that path and see the value. I also tried checking and unchecking the "Search the 64bit section of the registry" checkbox.
Did not seem to make a difference. I previously had the custom action executing after app search but moved it to after install welcome hoping to ensure the value had been populated.
I also thought maybe it had something to do with the space in between the "App Paths" in the key that we are searching for. However, I checked a few other system search examples that had spaces in them so I dont think that is the issue. Any ideas what I am doing wrong here? The Message box that pops up only says "excel.exe"
Edited by overlord, 26 June 2015 - 21:41.