Setup is unable to automatically close all applications - Advanced Installer Community
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Setup is unable to automatically close all applications

Hi Advanced Installer Support Team,

I sporadically experience the problem, that the installer failed to close automatically applications blocking the current installation. I often get the following screen:
Installer Message.png
Installer Message.png (5.69 KiB) Viewed 41064 times
Furthermore, sometimes the Windows Explorer is not restarted sometimes after finishing the installation.

Do you know this issue already? You mentioned in other posts, that this behavior is controlled by Windows Installer, do I have the chance to influence it at all?

Regards,

Roland
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Setup is unable to automatically close all applications

Hi,

I also noticed, that sometimes services installed by setup are not restarted automatically. Is this issue related to the one above?

Regards,

Roland
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setup is unable to automatically close all applications

Hello Roland,

I apologize for my delayed reply. We are a bit busy at the moment.

Indeed, this behavior is completely controlled by Windows Installer and appears when the installation/uninstall process tries to install/remove files that are used by another processes. However, in order to achieve what you want you can use the approach exposed in our "Detect or stop a process" how to. Also, you can take a look on our "Detect a service" and "Stop Service" custom actions articles.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Setup is unable to automatically close all applications

Hi Daniel,

indeed the problematic seems to be very tricky. I have already a DetectProcess CA in my project. How do I use it to detect multiple processes?

Furthermore I get the following message during installation:
FileInUse.png
FileInUse.png (4.47 KiB) Viewed 41004 times
But at the end of the installation, the setup does not require a reboot. Hence some files are still exists in older versions. So I guess, the detection of the running processes and applications works fine, but the reboot is missing. Do I need to trigger it manually based on some properties?

Regards,

Roland
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Setup is unable to automatically close all applications

Hi Daniel,

I did a bit more testing. I used a virtual machine with a snapshot. I always reverted to this snapshot and installed our product over an older, already installed version.

I can reproduce different behaviors:
  • The behavior described in the first post of this topic (19 May 2014, 15:46: message of open applications with failed to stop)
  • The behavior described in the second post of this topic (Today, 10:38 : message of reboot, but no reboot)
I always used the same virtual machine (Windows Server 2012), with the same snapshot. I randomly used some of our applications, but this seems to make no difference. The behavior seems to not predictable and I achieve one of both behaviors. The installation never ran smooth.

This is a very unsatisfying state at the moment. Our customers are complaining or a reboot is missing and the applications are not working correctly, due to some not (yet) replaced DLLs. What can I do, to improve the situation? Would an update to a newer installer version help (currently we are requiring Windows Installer 4.5, which might be already installed on most systems in the real world, or even a later version). The setup is build with AI 11.1.

I have attached a log file to the post as well.

Regards,

Roland
Attachments
MSI2E48.zip
(939.88 KiB) Downloaded 849 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setup is unable to automatically close all applications

Hello Roland,

First of all I apologize for my delayed reply. We had a few days of here due to a national holiday.

Unfortunately, the only way to avoid the related file in use dialogs is to detect and stop all processes which could use (during installation) your product installed files or services. This can be done using our "Detect or stop a process" approach. However, we don't have support to detect multiple processes at once. You should add a group of "Detect process" and "Terminate process" for every process which could use your files/services during installation. Also, as another workaround you can try to develop your own custom action in order to do this.

Also, in order to force a reboot after the installation you can set the "Reboot Behavior" combo box, from "Install Parameters" page to "Force Reboot after install" option. Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Setup is unable to automatically close all applications

Hi Daniel,

i do not want to force a reboot in general, I want to reboot the system, when it's needed. My testers constantly reporting, that there is a message, that some files might be blocked and a reboot is required, but the installer ever initiates a reboot of the target system. For me, it seems to be a problem with the part of the setup actually doing the reboot, not with the detection part of the process.
  • Is there a possibility to improve this behavior somehow?
  • Will a property set, when the windows installer detects running processes and a reboot might be required?
  • Can I manually reboot the system with a custom action (e.g. only in case of an update, only if a certain installation type is used, ... ?)
Regards,

Roland
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setup is unable to automatically close all applications

Hello Roland,

I'm afraid this is the standard Windows Installer behavior. The above related error messages are standard Windows Installer errors (1610 and 1611) and they are spawned by Windows Installer when your installation files are in use during your product installation. Also, you cannot detect when this error messages appear. The recommended way to avoid this errors is to use custom action for detecting and stopping your application processes during installation.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Setup is unable to automatically close all applications

Hi Daniel,

does an update to newer version of windows installer (like forcing schema version 5.0 in the setup) change something with this behavior?

Regards,

Roland
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setup is unable to automatically close all applications

Hello Roland,

A Windows Installer upgrade won't change this behavior. This will always happen when the installation files are in use during install/uninstall.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
R.Mueller
Posts: 202
Joined: Thu Aug 02, 2012 3:31 pm

Re: Setup is unable to automatically close all applications

Hi Daniel,

although this post is a while ago, I would like to ask another question related to this topic. I recently got the information, that the message about a required reboot is displayed, but the reboot is missing.

For me this sounds, that Windows Installer detects, that there are blocking files, but the final dialog step will not force the reboot. I have attached a log file, showing exactly this behavior (reboot is detected, but not executed after end of installation).

Can I have at least influence on that during installation or let the installer show up a message to enforce a reboot similar like here: http://www.advancedinstaller.com/user-g ... stall.html?

Regards,

Roland
Attachments
logfile.zip
(568.09 KiB) Downloaded 770 times
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Setup is unable to automatically close all applications

Hello Roland,

I'm afraid I'm not sure why Windows Installer decides not to prompt for reboot after installation when the file in use error appears. Accordingly with the Windows Installer System Reboots documentation you can check the "ReplacedInUseFiles" and "MsiSystemRebootPending" property values during installation or your can use the MsiGetMode function to check if a system reboot is pending.

I've searched for the "ReplacedInUseFiles" and "MsiSystemRebootPending" properties in your sent log file, but it seems they are not set. Somehow, I think Windows Installer decides at the end of installation that a reboot is not necessary anymore. You can try to use the "MsiGetMode" function to check if a system reboot is pending and see if it brings a different result.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”