ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

How to terminate all instances of e.g. explorer.exe

Wed Jul 13, 2016 10:48 am

Hello,

to install a windows explorer comntext menu handler (dll) the explorer needs to be terminated.
But there can be more intances of explorer.exe, I have seen systems with 7 instances.
How to terminate all of them?

Chris

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to terminate all instances of e.g. explorer.exe

Wed Jul 13, 2016 3:30 pm

Hi Chris,

You should be able to achieve this by adding a "Terminate Process" custom action after the "Preparing" action group, write "explorer.exe" in the "Process name" field and select the "deferred" with "no impersonation" options for it.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: How to terminate all instances of e.g. explorer.exe

Wed Jul 20, 2016 10:22 am

but then it seems only one explorer.exe is terminated and the installation shows a dialog the user should close the program which is blocking the installation, but it does not tel which program, and the normal user is unable to terminate explorer.exe via the task manager, and though the installation fails.

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to terminate all instances of e.g. explorer.exe

Wed Jul 20, 2016 11:32 am

Hi Chris,

Did you checked the "When the system is being modified (deferred)" and the "Run under the LocalSystem account with full privileges (no impersonation)" options for the "Terminate Process" custom action?

Indeed, a normal user cannot stop all the processes, but I tested it and using the above options will give the installer the privileges to stop all those processes.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: How to terminate all instances of e.g. explorer.exe

Fri Jul 22, 2016 10:13 am

Eusebiu wrote:Did you checked the "When the system is being modified (deferred)" and the "Run under the LocalSystem account with full privileges (no impersonation)" options for the "Terminate Process" custom action?
It seems, all these options are not available in AI 7.1.3?

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to terminate all instances of e.g. explorer.exe

Fri Jul 22, 2016 10:44 am

Hi,

The "Terminate process" and the "Deferred with no impersonation" options are available in Advanced Installer 7.1.3, too (see the attached picture). Aren't all the "explorer.exe" processes stopped if you use the settings from this picture?

Best regards,
Eusebiu
Attachments
Advanced Installer 7.1.3.png
Advanced Installer 7.1.3.png (142.47KiB)Viewed 6561 times
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: How to terminate all instances of e.g. explorer.exe

Fri Jul 22, 2016 12:52 pm

I have now updated to AI 13.1
But the checkbox 'Run under the LocalSystem account with full privileges (no impersonation)' is disabled?
No hint or explanation why?


Ok, I now checked 'When the system is being modified (deferred)' then it is enabled.

Chris

ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: How to terminate all instances of e.g. explorer.exe

Sun Jul 24, 2016 1:43 pm

It seems with AI 13, there is no need to terminate the explorer.exe.
Working fine so far.

ChrisGue
Posts: 93
Joined: Tue Feb 03, 2009 7:26 pm

Re: How to terminate all instances of e.g. explorer.exe

Mon Jul 25, 2016 10:57 am

Unfortunately on some machines still the same problem:
the installation detects that the explorer has to be terminated and displays the accordingdialog to the user.
But then only one instance is terminated and the installation is unable to proceed.

I now created a custom action when the use presses the OK button in the dialog, which shows that the explorer.exe has to be closed.
My custom action:
launch file
file to launch: [%ComSpec]
parameters: /c taskkill.exe /IM explorer.exe /F
immediately
Wait for finishing not checked

But this is not working. I tested all possible sedttings.
When I run the command taskkill.exe /IM explorer.exe /F manually all works fine.

What is the problem woth the custom action?

Chris

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: How to terminate all instances of e.g. explorer.exe

Thu Jul 28, 2016 6:29 am

Hi Chris,

Isn't this custom action working even if you set the "deferred" with "no impersonation" options for it?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”