- 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 (5.69KiB)Viewed 30285 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
Mon May 19, 2014 4:42 pm
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: 8221
- Joined: Mon Apr 02, 2012 1:11 pm
- Contact: Website
Re: Setup is unable to automatically close all applications
Wed May 21, 2014 10:19 am
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
- R.Mueller
- Posts: 202
- Joined: Thu Aug 02, 2012 3:31 pm
Re: Setup is unable to automatically close all applications
Thu Jun 05, 2014 9:38 am
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 (4.47KiB)Viewed 30225 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
Thu Jun 05, 2014 1:13 pm
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.88KiB)Downloaded 517 times
- Daniel
- Posts: 8221
- Joined: Mon Apr 02, 2012 1:11 pm
- Contact: Website
Re: Setup is unable to automatically close all applications
Tue Jun 10, 2014 3:34 pm
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
- R.Mueller
- Posts: 202
- Joined: Thu Aug 02, 2012 3:31 pm
Re: Setup is unable to automatically close all applications
Thu Jun 12, 2014 8:31 pm
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: 8221
- Joined: Mon Apr 02, 2012 1:11 pm
- Contact: Website
Re: Setup is unable to automatically close all applications
Fri Jun 13, 2014 11:55 am
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
- R.Mueller
- Posts: 202
- Joined: Thu Aug 02, 2012 3:31 pm
Re: Setup is unable to automatically close all applications
Thu Jun 26, 2014 3:33 pm
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: 8221
- Joined: Mon Apr 02, 2012 1:11 pm
- Contact: Website
Re: Setup is unable to automatically close all applications
Fri Jun 27, 2014 2:26 pm
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
- R.Mueller
- Posts: 202
- Joined: Thu Aug 02, 2012 3:31 pm
Re: Setup is unable to automatically close all applications
Wed Apr 22, 2015 2:01 pm
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.09KiB)Downloaded 293 times
- Daniel
- Posts: 8221
- Joined: Mon Apr 02, 2012 1:11 pm
- Contact: Website
Re: Setup is unable to automatically close all applications
Fri Apr 24, 2015 11:47 am
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
Return to “Common Problems”
I am facing the problem using installer generated by InstallShield. The issue is appearing during uninstall process. setup.exe file requires administrator privileges. When I try to uninstall application using setup.exe file everything works as expected. But when I try to uninstall application from windows programs and features then uninstall is executing .msi file. In this scenario the result is that uninstall process is not able to close opened applications and the error «the setup was unable to automatically close all requested applications (…)» is appearing. I have checked the problem on different operating systems. It seems that on Windows 7 and 10 the problem is appearing but on Windows Server 2012R2 it works like expected (uninstall is able to close required applications).
Any idea how to solve the issue? I would be grateful for tips.
PhilDW
20.1k1 gold badge18 silver badges27 bronze badges
asked Feb 15, 2018 at 8:37
1
In meantime I found out accidentally that after changing UAC level and restarting the computer uninstall is able to close applications (previously I checked it without restart and there was no difference in behaviour so I thought it was not the issue). Thank you very much for your tip @PhilDW. I have changed UAC settings again and I tried to create logs and logs connected to the issue are presented below:
MSI (s) (B4:D0) [15:44:09:691]: RESTART MANAGER: Detected that application with id 15584, friendly name ‘XYZ System Monitor’, of type RmUnknownApp and status 1 holds file[s] in use.
MSI (c) (4C:C8) [15:44:09:697]: RESTART MANAGER: Session opened.
MSI (c) (4C:C8) [15:44:09:707]: RESTART MANAGER: Detected that application with id 15584, friendly name ‘XYZ.Monitor.exe’, of type RmCritical and status 1 holds file[s] in use.
MSI (c) (4C:C8) [15:44:09:707]: Note: 1: 2262 2: ListBox 3: -2147287038
Action 15:44:31: ShutdownApplications. Shutting down applications
MSI (s) (B4:D0) [15:44:32:071]: RESTART MANAGER: Successfully shut down all applications in the service’s session that held files in use.
MSI (c) (4C:C8) [15:44:32:071]: RESTART MANAGER: Successfully shut down all applications that held files in use.
MSI (s) (B4:D0) [15:44:32:573]: Note: 1: 1611
The setup was unable to automatically close all requested applications. Please ensure that the applications holding files in use are closed before continuing with the installation.
I don’t understand why logs claim that all applications were successfully shuted down and then log claims something opposite.
answered Feb 16, 2018 at 8:06
3
The easiest way is to kill the process before it gets to that point in the installer. You will want to put this earlier in the InstallExucute sequence so that in runs in silent mode.
For example, in vbscript
Dim oShell : Set oShell = CreateObject(«WScript.Shell»)
oShell.Run «taskkill /im exeprocessname.exe», , True
answered Feb 23, 2018 at 0:54
BillBill
1321 gold badge1 silver badge10 bronze badges
Определение проблемы:
Отключается на некоторое время во время отмены регистрации COM и говорит The setup was unable to automatically close all requested applications. Please ensure that the applications holding files in use are closed before continuing with the installation
, Но на самом деле мое расширение успешно выгружено и удалено.
Определение среды:
Я создал какое-то фиктивное расширение пространства имен оболочки для тестов. Это реализует IContextMenu
и все методы возвращаютсяS_OK
и больше ничего не делать и RGS файл
HKCR
{
xxx.sergz.dummyShellExt.1 = s 'DummyNSE Class'
{
CLSID = s '{6C0FBE00-9898-4BB0-806F-3ED7D2F1170D}'
}
xxx.sergz.dummyShellExt = s 'DummyNSE Class'
{
CurVer = s 'xxx.sergz.dummyShellExt.1'
}
NoRemove CLSID
{
ForceRemove {6C0FBE00-9898-4BB0-806F-3ED7D2F1170D} = s 'DummyNSE Class'
{
ProgID = s 'xxx.sergz.dummyShellExt.1'
VersionIndependentProgID = s 'xxx.sergz.dummyShellExt'
ForceRemove Programmable
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
TypeLib = s '{3DC947F0-6691-4043-B414-29F749209905}'
Version = s '1.0'
}
}
NoRemove Directory
{
NoRemove Background
{
NoRemove ShellEx
{
NoRemove ContextMenuHandlers
{
ForceRemove DummyShellExt = s '{6C0FBE00-9898-4BB0-806F-3ED7D2F1170D}'
}
}
}
}
}HKLM
{
NoRemove Software
{
NoRemove Microsoft
{
NoRemove Windows
{
NoRemove CurrentVersion
{
NoRemove Shell Extensions
{
NoRemove Approved
{
val '{6C0FBE00-9898-4BB0-806F-3ED7D2F1170D}' = s 'xxx.sergz Dummy shell extension.'
}
}
}
}
}
}
}
я выбираю Professional
установщик и добавил только мой файл DLL. По свойствам файла Registration
Я выбираю вкладку Auto register file...
, Extract registration info...
а также Synchronization
является Enabled
, В Product Information->Install Parameters->PackageType
я выбираю 64-bit package for x64...
,
Сейчас я строю MSI и устанавливаю расширение.
Запустите проводник и щелкните правой кнопкой мыши где-нибудь на фоне папки. Согласно моему журналу мое расширение загружено и является DLL_PROCESS_ATTACH и несколько раз DLL_THREAD_ATTACH.
Я снова запускаю MSI и выбираю Remove
, Это говорит о том, что вы должны закрыть ... applications are using files...
и есть только Windows Explorer
в списке. я выбираю Automatically close ...
и нажмите ОК.
Все окна Explorer закрыты, но кажется, что Explorer не был закрыт.
Статус «Завершение работы приложений», по моему логу dll уже выгружен. Проблема здесь. DLL уже выгружена, но MSI все еще чего-то ждет, а затем говорит The setup was unable to automatically close all requested applications. Please ensure that the applications holding files in use are closed before continuing with the installation
,
Я нажимаю OK, и процесс продолжается, и моя DLL успешно удаляется в конце.
Я использую Windows 8 64bit.
Каковы причины этого ожидания и сообщение о том, что приложения не могут быть закрыты. Как я могу понять это?
1
Решение
Правильно, это не сработает, очень вероятно, что расширение оболочки будет загружено, а MSI не убьет Explorer.exe. И вы бы этого не хотели, это скорее ужасное зрелище для пользователя.
Вам нужно будет использовать альтернативный способ, чтобы удалить / зарегистрировать расширение. Не ясно, что может означать «Профессиональный установщик». Но вы всегда можете отключить / зарегистрировать COM-сервер, изменив реестр самостоятельно, а не предоставляя это DLL. На самом деле это рекомендуемый способ. Вы уже знаете ключи реестра из вашего файла .rgs. Вы также можете использовать харвестер Heat.exe из набора инструментов WiX. DLL необходимо удалить, отложив ее при следующем входе в систему, добавив ее в раздел реестра PendingFileRenameOperations. Проверьте правильность процедуры в вашем инструменте создателя установщика.
0
Другие решения
Других решений пока нет …
Содержание
- Проблема с установкой
- Multiple messages — ‘ Setup unable to automatically close all applications.
- Replies (18)
- Check our other helpful areas that might answer your question
- Suggested Articles
- User Guide
- Videos
- The following applicaitons should be closed before continuin
- The following applicaitons should be closed before continuin
- Re: The following applicaitons should be closed before conti
- Re: The following applicaitons should be closed before conti
- Re: The following applicaitons should be closed before conti
- Closing Applications
- 4 Answers 4
- Error: «Close the following applications to continue»
- Error message: Close applications to continue installation
- Solution: Terminate the application
- Terminate the process in Windows
- Terminate the process in macOS
Проблема с установкой
Был скачан ansys academic 19.1, в файле setup просил закрыть все приложения, хотя все были закрыты. Потом попробовала установить версию 18,2, но файл setup вообще не запускается, в результате и в 19,1 версии перестал запускаться файл,я разрешаю как администратор, ноутбук думает и дальше ничего не открывает, с чем это может быть связано?
Из вашего описания невозможно понять проблему. Поэтому вынужден ответить вопросами на вопрос.
Вы точно скачали академическую версию (платную), или все-таки Student?
Был скачан ansys academic 19.1, в файле setup просил закрыть все приложения, хотя все были закрыты.
Потом попробовала установить версию 18,2, но файл setup вообще не запускается
Что происходит при попытке запуска? Никакой видимой реакции, и в диспетчере задач нет процесса Setup.exe? Или ошибку выкидывает?
в результате и в 19,1 версии перестал запускаться файл
Также прошу уточнить, сколько у Вас оперативной памяти, какой процессор и какая операционная система. Если процесс установки запускался, но по каким-то причинам не завершился успехом, прошу выслать файлы install.log и install.err из директории установки (напр. C:Program FilesANSYS Inc).
Версия student, которая бесплатная
Проблема была следующая: писал «please close all other applications before continuing with the installation», закрывала все, диспетчер был пуст, но не помогло, антивирусник тоже отключала, в связи с эти решила попробовать установить версию 18.2
При попытке запуска файла setup.exe не было никакой реакции компьютера (в диспетчере задач соответственно тоже не было setup.exe)
Изначально в версии 19.1 он запускался, потом при попытке установить версию 18.2 перестал открывать setup.exe в обоих версиях.
Параметры ноутбука: ОЗУ — 6 ГБ, процессор — AMD A8-6410 APU with AMD Radeon R5 Graphics 2.00 GHz, Тип системы — 64х, Windows 7
Multiple messages — ‘ Setup unable to automatically close all applications.
Original title: Multiple messages
I am continuously getting the following message although I am NOT trying set anything up! ‘ Setup unable to automatically close all applications. It is recommended that you close all applications using files that need to be updated by setup before continuing’ Can somebody please help. Thanks in advance.
* Please try a lower page number.
* Please enter only numbers.
* Please try a lower page number.
* Please enter only numbers.
4 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
129 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Alright, that makes it a little harder to find, but definitely not impossible. There’s a few ways I can think of. First, try just pressing Ctrl-Shift-Escape to open the task manager, and see if that dialog is listed as a ‘running program’. If it is, you can right-click it in the list and choose «go to process» to find what program is actually responsible for showing that dialog.
If that fails to help, there’s a more direct method. Microsoft makes a tool called Process Explorer that can help. Run that program, and on the toolbar is a «bulls eye» crosshair that you can drag-drop onto the unknown dialog, and it will tell you what process is creating that dialog.
3 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
1 person found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
I don’t recognize that file by name, but let’s try to find out what it is. In that details list, you can right-click the process name again and this time, choose «open file location» to find out where that file is stored. This might help identify what it is, where it came from, or at least help us remove it.
If you do decide to remove it, I recommend putting it in the Recycle Bin so that we can get it back if we absolutely need to (unlikely, but better to be safe).
In addition, we need to find out where the instruction is that is telling the computer to run that file. Most likely, it’s inside your Startup folder, or inside the registry entry that controls auto-start programs that typically run in the background. To remove it from there, the easiest way is to use the Startup tab in Task Manager (Ctrl-Shift-Esc) (or MSCONFIG for Windows 7 or earlier).
Check our other helpful areas that might answer your question
Suggested Articles
User Guide
Videos
The following applicaitons should be closed before continuin
The following applicaitons should be closed before continuin
Post by romanf » Mon Jun 13, 2011 10:12 pm
The environment is Windows 7.
I have created a custom action that closed my installed application. I would like this custom action to be the first thing that runs during the uninstall process.
I’ve placed this custom action under the «Uninstall». When I uninstall (from the add/remove programs) the application a window pops up with the message: «The following applicaitons should be closed before continuing» and an empty box is displayed. if I choose «do not close applications (a Reboot may be required) only after I press OK on that window my custom action that closes my application runs.
Is there any way to run my custom action before this window appears — to prevent it from appearing?
Re: The following applicaitons should be closed before conti
Post by mihai.petcu » Tue Jun 14, 2011 7:54 am
Hi Roman and welcome to the Advanced Installer Forums,
You can try to schedule your custom action after the Begin standard action in the InstallUISequence and share it( drag and drop holding Shift key ) after the Begin standard action in the InstallExecuteSequence. This way your application should also close when running the uninstall silently.
You custom action should also be set with the following execution condition:
Re: The following applicaitons should be closed before conti
Post by romanf » Sat Jun 18, 2011 11:46 pm
Thank you Mihai for your answer.
It seems that running custom action after the Begin standard action is too early — as I get initialization errors.
I believe that the right location to run my custom action that closes my application before uninstall actually starts its action is after CostFinilize.
The thing is that my application takes 3-5 seconds to close and meanwhile the sequence continues and gets to InstallValidate where the BAD «File in use» dialog pops up.
Is there any way to halt execution until my application exists?
The execution properties I use for my custom action is: Synchronous execution, ignore return code.
Re: The following applicaitons should be closed before conti
Post by Cosmin » Sun Jun 19, 2011 12:02 pm
Windows Installer continues the execution as soon as the custom action finishes. So you need to make your custom action wait for your application to close. This is usually done through custom code.
Closing Applications
What is best practice when closing a C# application?
I have read that you can use:
But what is the difference?
Furthermore, with regards to Environment.Exit(0), I have used exit codes before when working with Java but have never fully understood their purpose. What role do they play when exiting an application in C#?
4 Answers 4
System.Windows.Forms.Application.Exit() — Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed. This method stops all running message loops on all threads and closes all windows of the application. This method does not force the application to exit. The Exit() method is typically called from within a message loop, and forces Run() to return. To exit a message loop for the current thread only, call ExitThread() . This is the call to use if you are running a Windows Forms application. As a general guideline, use this call if you have called System.Windows.Forms.Application.Run() .
System.Environment.Exit(exitCode) — Terminates this process and gives the underlying operating system the specified exit code. This call requires that you have SecurityPermissionFlag.UnmanagedCode permissions. If you do not, a SecurityException error occurs. This is the call to use if you are running a console application.
I hope it is best to use Application.Exit
See also these links:
Application.Exit is for Windows Forms applications — it informs all message pumps that they should terminate, waits for them to finish processing events and then terminates the application. Note that it doesn’t necessarily force the application to exit.
Environment.Exit is applicable for all Windows applications, however it is mainly intended for use in console applications. It immediately terminates the process with the given exit code.
In general you should use Application.Exit in Windows Forms applications and Environment.Exit in console applications, (although I prefer to let the Main method / entry point run to completion rather than call Environment.Exit in console applications).
For more detail see the MSDN documentation.
Error: «Close the following applications to continue»
某些 Creative Cloud 应用程序、服务和功能在中国不可用。
Error message: Close applications to continue installation
When you install Adobe products, you see the following message:
Please close the following applications to continue:
If this prompt recurs even after you’ve closed the listed applications, some processes for the applications could be running in the background. Terminate these background processes to continue installing the Adobe product.
Solution: Terminate the application
Terminate the application in your computer. For more details, see the following:
Terminate the process in Windows
Terminate the process using Windows Task Manager.
Right-click the taskbar and select Task Manager .
If the application mentioned in the error is listed, select the application and click End Task .
Click More details to expand the Task Manager.
Click the Processes tab. Look for any processes related to the application mentioned in the error message.
Select the process and click End task .
For example, if Adobe Bridge is mentioned in the error message, find Bridge.exe, select it, and click End task.
Terminate the process in macOS
Terminate the process on Mac OS by following these instructions:
Click the Apple icon in the upper-left corner of the screen, and choose Force Quit .
The Application List appears.
Select the application mentioned in the error message and click Force Quit .
If the application is not listed, go to Applications > Utilities and then click Activity Monitor .
Select the process and click the Force a process to quit icon.
For example, if Adobe Crash Daemon is mentioned in the error message, find Adobe Crash Daemon, select it, and click the Force a process to quit icon.
Close SugarSync if the application displayed is ShellExtLoader.