InstallAnywhere can't delete file if .Net program subscribed to Event Log notifications

91 views Asked by At

On Windows 7 Professional I've got a .Net program monitoring Windows Event Log.

On the same workstation is installed a Java program as a Windows service. This program needs to be uninstalled with InstallAnywhere. The uninstall ends with the Java service executable being held by my monitoring program (which I can clearly see using procexp.exe) even though it just manipulates the strings from the notification event - not ever trying to open neither the said process handle nor any other file.

I wonder whether this is a known behavior or a bug of Windows/.Net/InstallAnywhere.

If it is expected, is there a workaround?

1

There are 1 answers

1
Jérôme On

I guess this is expected Windows behaviour. The installer jre folder is locked for reading. If the uninstallation finally ended, it is possible that the remaining folder (jre) or a file in that folder is flagged to be deleted after reboot. You can check if HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations contains that entry. If true, then it will be deleted after reboot. Otherwise you will have to stop your monitoring program before attempting uninstallation.