cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
prashantlade
Level 4

IE Application is open but not detected with IS(FILE_LOCKED)

Hi,

I have written Installscript installer and Basic MSI installers. My application need to abort installation if it encounters open office application or Internet explorer (IE). I have written everything and it works fine on windows XP. Somehow, it fails to detect the IE open application on Vista. What could be the reason?

I am pasting my function to check this. This is really puzzling and I have tried many code changes without success. Can anybody help?

Regards
Prashant

function BOOL isIExplorerOpen(bInstalling)
NUMBER nvType, nvSize, nIERunning;
STRING sRegPath;
BOOL bIEOpen;
STRING sIEApp, sIEPath ;
begin
sRegPath = "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\";
sIEApp = "IEXPLORE.EXE";
bIEOpen = FALSE;

RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
RegDBGetKeyValueEx( sRegPath+sIEApp,"",nvType, sIEPath, nvSize);
RegDBSetDefaultRoot(HKEY_CLASSES_ROOT);

//MessageBox("IE Path = "+sIEPath, WARNING);
//LongPathToQuote(sIEPath, FALSE);
nIERunning = Is(FILE_LOCKED, sIEPath);

if( nIERunning ) then
MessageBox("nIERunning is TRUE", WARNING);
if(bInstalling = TRUE) then
MessageBox(@IE_OPEN_INSTALL, INFORMATION);
else
MessageBox(@IE_OPEN_UNINSTALL, INFORMATION);
endif;
bIEOpen = TRUE;
endif;
//MessageBox("nIERunning is FALSE", WARNING);

return bIEOpen;
end;
Labels (1)
0 Kudos
(3) Replies
Johannes_T
Level 6

It's maybe an IE problem rather than an IS problem. Perhapbs, IE doens't lock this file while it's started on Vista.
I would use Sysinternals Process Explorer to check for other files IE locks on startup and check one of these with is(locked...).
Only an idea,
Jo
0 Kudos
prashantlade
Level 4

Thanks Jo..

I will check this. However, if anyone has faced this problem and know the exact file to be used, it would be of great help. I can save my time.

Regards
Prashant
0 Kudos
Kelter
Level 10

see the topic:
List and Shut Down Running Applications

here:
http://www.installsite.org/pages/en/isp_ext.htm

you should be able to interpret that code in order to find and close iexplore.exe.
0 Kudos