Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

InstallValidate not prompting FilesInUse


4 replies to this topic

dtasanas

dtasanas
  • Full Members
  • 83 posts

Posted 23 February 2005 - 20:08

i'm doing a major upgrade and having a problem with the FilesInUse dialog not appearing.

InstallValidate detects that there are files "being held in use" (via msi log) but FilesInUse does not popup to notify the user.

i read through MSI help and found out that FilesInUse does not show if the application holding the files in use is not associated with an active window (ie a service could be holding the file in use)

suggestions?

i've already written a CA to detect files in use and use it during uninstall. but how do i fire the CA during upgrade? what condition do i check for during an upgrade situation?
Don Tasanasanta[br]Configuration/Installation Eng

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 24 February 2005 - 10:50

I fixed a similar problem (for upgrading, needed to remove a non-MSI install, but a program in that install could be in use) as follows:

Just before InstallValidate, schedule your CA, checking the files being used, and find a suitable description (like the window name). Then your CA should show the very same dialog using MsiProcessMessage. Make sure it interpretes the return value and check for Retry, in that case check again, and show the dialog again if necessary.

The drawback is that your CA cannot obtain the locked files that InstallValidate would show. As a result, the user may be presented this dialog twice.

Further, when an install is removed because of a major upgrade, that install has a property UPGRADINGPRODUCTCODE (or something like that) set.

dtasanas

dtasanas
  • Full Members
  • 83 posts

Posted 06 June 2005 - 22:31

what does Windows Installer do if it encounters a locked file but it unable to display the "files in use" dialog?

does it still mark the files to be delteted on reboot?

or does it just leave them behind?
Don Tasanasanta[br]Configuration/Installation Eng

Zweitze

Zweitze
  • Full Members
  • 522 posts

Posted 07 June 2005 - 08:04

A reboot will be scheduled, the files will be replaced after reboot. Note that the FilesInUse is NOT presented when a locked file is encountered, but much earlier, during InstallValidate.
The FilesInUse dialog just presents a list of Windows that the user could close, so he can prevent a reboot. If Windows cannot find a matching window for a locked file (eg. part of a service), no window will be presented in the FilesInUse dialog for this file, and a reboot is imminent.

That is exactly the reason that I decided to show the FilesInUse dialog for the items that I know of, but Windows Installer could not find out.

sks2004

sks2004
  • Members
  • 6 posts

Posted 22 December 2005 - 06:43

We have a situation; if the app is installed to a Mapped-Network-Drive...then later down the line a Patch is run and a file is in use (this is quite common for us, long story)...the File In Use dialog should appear but it doesn't. The Temp file exists within the installdir...but upon reboot it doesn't replace the original file in use.

This seems to be a Mapped-Network_Drive issue...the theory is that the mapped drive isn't attached before Windows attempts to replace the file. (see HKLM\SYSTEM\ControlSet001\Control\Session Manager...a REG_MULTI_STRING value containg the list of files to replace, etc...PendingFileRenameOperations). This reg entry will exist but upon reboot it will be deleted, presumably because it ran (or attempted to do so).

Here is a log of a successful patch (User is a member of the network domain, and installation is on a local mapped network drive):

QUOTE
MSI (s) (48:E0) [13:49:21:125]: PROPERTY CHANGE: Modifying CostingComplete property. Its current value is '0'. Its new value: '1'.
MSI (s) (48:E0) [13:49:21:125]: Note: 1: 2727 2:
Info 1603.The file Z:\XXX1.dll is being held in use by the following process: Name: XXX205, ID: 2620, Window Title: (not determined yet). Close that application and retry.
Info 1603.The file Z:\XXX205.exe is being held in use by the following process: Name: XXX205, ID: 2620, Window Title: (not determined yet). Close that application and retry.
Info 1603.The file Z:\XXX3.dll is being held in use by the following process: Name:XXX205, ID: 2620, Window Title: (not determined yet). Close that application and retry.
Info 1603.The file Z:\XXX4.dll is being held in use by the following process: Name: XXX205, ID: 2620, Window Title: (not determined yet). Close that application and retry.
MSI (s) (48:E0) [13:49:33:125]: 1 application(s) had been reported to have files in use.
MSI © (34:C0) [13:49:33:125]: Note: 1: 2262 2: ListBox 3: -2147287038
MSI © (34:C0) [13:49:33:140]: Transforming table Binary.
MSI © (34:C0) [13:49:33:140]: Transforming table Binary.
MSI © (34:C0) [13:49:33:140]: Note: 1: 2262 2: Binary 3: -2147287038
MSI (s) (48:E0) [13:49:40:625]: Note: 1: 2727 2:
Action ended 13:49:40: InstallValidate. Return value 1.



------------------------------------


Here is a log of an unsuccessful patch (User is not a member of the network domain, and installation is on a local mapped network drive):

QUOTE
MSI (s) (68:84) [16:35:44:406]: PROPERTY CHANGE: Modifying CostingComplete property. Its current value is '0'. Its new value: '1'.
MSI (s) (68:84) [16:35:44:406]: Note: 1: 2727 2:
MSI (s) (68:84) [16:35:44:421]: Note: 1: 2727 2:
Action ended 16:35:44: InstallValidate. Return value 1.





I might add, we expect these four files to be in use. Further within the 'bad' log, there is data describing that the offending files cannot be replaced, and are being renamed to .TMP files, requiring a reboot. As I stated, rebooting does nothing with these files...they persist, but don't replace.