jeremyspiegel
Posts: 2
Joined: Tue Feb 13, 2018 4:19 am

Pauses in InstallValidate with files in use

Wed Feb 14, 2018 6:37 pm

Hi,

I have an Advanced Installer project (latest version, 14.5.2) that installs a service and a shell extension (among other things). I've noticed that upgrades can be quite slow, and in looking at the MSI log, I found that there are two InstallValidate stages, each having a pause, where the service executable and a helper dll are found to be in use by the service, and the old version of the shell extension is in use by explorer:
MSI (s) (3C:20) [09:28:00:441]: Note: 1: 2727 2:
Info 1603. The file C:\Program Files\Box\Box\Box.Desktop.UpdateService.exe is being held in use by the following process: Name: Box.Desktop.UpdateService, Id: 5496, Window Title: '(not determined yet)'. Close that application and retry.
Info 1603. The file C:\Program Files\Box\Box\MetricsCollector.dll is being held in use by the following process: Name: Box.Desktop.UpdateService, Id: 5496, Window Title: '(not determined yet)'. Close that application and retry.
MSI (s) (3C:20) [09:28:05:597]: 1 application(s) had been reported to have files in use.
MSI (c) (A4:60) [09:28:05:597]: File In Use: -Box.Desktop.UpdateService- Window could not be found. Process ID: 5496
MSI (c) (A4:60) [09:28:05:597]: No window with title could be found for FilesInUse
MSI (s) (3C:20) [09:28:05:597]: Note: 1: 2727 2:
Action ended 9:28:05: InstallValidate. Return value 1.
...
MSI (s) (3C:B4) [09:28:10:863]: Note: 1: 2727 2:
Info 1603. The file C:\Program Files\Box\Box\BoxShellExt-1.0.5.dll is being held in use by the following process: Name: explorer, Id: 6752, Window Title: '(not determined yet)'. Close that application and retry.
MSI (s) (3C:B4) [09:28:15:035]: Note: 1: 2727 2:
Action ended 9:28:15: InstallValidate. Return value 1.
On a clean system where this log was taken, these pauses are ~5 seconds, but on other systems the pauses are longer (~40 seconds).

Later in the upgrade, during the InstallExecute stage, the service is successfully stopped and updated, and the new version of the shell extension with a different file name (BoxShellExt-1.0.6.dll) is successfully installed.

Are these pauses expected? Do I need to stop the service separately prior to the InstallValidate stage? And how do I prevent the installer from pausing when seeing if the shell extension is in use? (I am ok with marking it for delete on reboot).

Thanks!

Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Pauses in InstallValidate with files in use

Mon Feb 19, 2018 10:21 am

Hello Jeremy,

An upgrade installation consists in two parts:
  • -the uninstall of the old product version
    -the installation of the new product version
The installer checks if any file is in use during the "InstallValidate" action and if so, you should be prompted with the MsiRMFilesInUse dialog. This is managed automatically by Windows Installer.
The InstallValidate action notifies the user if one or more files to be overwritten or removed are currently in use by an active process.
To avoid displaying this dialog or in order to make sure no file is in use, it is recommended to have a detect and stop process/service implementation in the installer.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

jeremyspiegel
Posts: 2
Joined: Tue Feb 13, 2018 4:19 am

Re: Pauses in InstallValidate with files in use

Tue Feb 20, 2018 11:41 pm

Hi Sorin,

Thanks for the response! I decided to disable the InstallValidate action as suggested in https://stackoverflow.com/a/32416838/2797675.

Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: Pauses in InstallValidate with files in use

Tue Feb 27, 2018 10:26 am

Hello,

You are welcome!

Just let me know if you have any other questions.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”