为什么程序没有杀死并重新启动explorer.exe?

时间:2023-01-20 17:29:45

I know of a lot of programs that once installed (or an update to the registry) they need something to refresh the values. This can be done by killing and restarting explorer.exe, however most of them do not do this and rather ask you to restart your computer. A process that takes a long time.

我知道很多程序一旦安装(或对注册表的更新),他们需要一些东西来刷新值。这可以通过杀死并重新启动explorer.exe来完成,但是大部分都不会这样做,而是要求您重新启动计算机。这个过程需要很长时间。

I'm currently writing a tool that will be used by technical people only, and it makes some changes to the registry that needs a reboot (or restart explorer.exe) to take effect. I don't have to worry about my users being freaked out by explorer.exe restarting on them so that's not an issue.

我目前正在编写一个仅供技术人员使用的工具,它会对需要重新启动(或重新启动explorer.exe)的注册表进行一些更改才能生效。我不必担心我的用户被explorer.exe重新启动就吓坏了,所以这不是问题。

What else should I consider before doing this? Why do the other applications tell you to reboot instead of the faster, restart explorer? Is there a security reason? Or is it just habit?

在做这个之前我还应该考虑什么?为什么其他应用程序会告诉您重启而不是更快的重启资源管理器?有安全理由吗?还是只是习惯?

10 个解决方案

#1


Killing and restarting explorer is not going to do everything that a restart of the system will do:

杀死并重新启动资源管理器不会执行重新启动系统将执行的所有操作:

1) Any currently running application will not get refreshed.

1)任何当前正在运行的应用程序都不会刷新。

2) This can lead to stability problems on the system, as well. I've, in particular, noticed problems with my graphics driver not getting updated correctly after an explorer shutdown/restart.

2)这也可能导致系统的稳定性问题。我特别注意到在浏览器关闭/重启后我的图形驱动程序无法正确更新的问题。

3) It just kind of smells ;) Killing a process as part of an install just seems nasty.

3)它只是一种气味;)作为安装的一部分杀死一个进程似乎很讨厌。

#2


I've seen problems with icons in the notification area not showing up after explorer has restarted (usually after it stops responding and I have to kill it).

我已经看到通知区域中的图标问题在资源管理器重新启动后没有出现(通常在它停止响应后我必须杀死它)。

Depending on the notification icon, this could cause the user problems.

根据通知图标,这可能会导致用户出现问题。

#3


Rebooting Windows is a very well-tested operation. Log out/in is too. You can expect all third-party software has been tested through a restart, and almost all has been tested through log out, log in.

重新启动Windows是一项经过严格测试的操作。退出/退出也是。您可以预期所有第三方软件都已通过重启进行测试,几乎所有第三方软件都已通过注销进行测试,登录。

How much of it do you think is tested through kill & respawn explorer.exe? Probably nowhere near as much, and certainly nowhere near as thoroughly.

您认为通过kill&respawn explorer.exe测试了多少?可能远没有那么多,当然也没有那么彻底。

So, if you're distributing internally, to a very well-controlled environment, sure, go ahead and kill & respawn explorer.exe. But don't do it otherwise, as you're putting the user's machine into a very poorly tested state, and things may mysteriously break until (s)he reboots.

所以,如果你在内部分发,在一个控制良好的环境中,请确保继续杀死并重新生成explorer.exe。但是不要这样做,因为你将用户的机器置于一个非常糟糕的测试状态,并且事情可能会神秘地破坏,直到他重新启动。

#4


It is possible that other changes have been made that require more than a restart of explorer.exe. Also as you said, restarting explorer.exe can be quite alarming for end-users.

有可能进行了其他更改,需要重新启动explorer.exe。另外正如您所说,重新启动explorer.exe对于最终用户来说可能会非常惊人。

#5


The explorer can have unsaved state (open windows, folder view settings, etc) which are lost if it suddenly restarts). I'd hate it if an installer would kill my explorer.exe without asking and I'm not sure I would think it an improvement over just rebooting.

资源管理器可以具有未保存状态(打开窗口,文件夹视图设置等),如果突然重新启动,则会丢失该状态。我讨厌它,如果安装程序会在没有询问的情况下杀死我的explorer.exe而且我不确定我是否会认为这只是重新启动的改进。

On the list of things that are not handled by restarting the explorer.exe are especially replacing DLLs which are currently in use and programs (beyond the explorer.exe) that do not listen to the registry change events but hold information from there.

在重新启动explorer.exe未处理的事项列表中,特别是替换当前正在使用的DLL和不监听注册表更改事件但保存信息的程序(在explorer.exe之外)。

#6


Is it always explorer that needs to be restarted?

是否总是需要重新启动资源管理器?

I had an app once that installed a performance monitor counter that should have been shared by my app and Perfmon (when it was running) so installing it should be just to make sure either app was closed. Simples... except for a driver (can't remember which one or I'd name n shame the manufacturer) that loaded every perfmon object dll and kept them all locked. As a result, my app required a reboot.

我有一个应用程序,安装了一个应该由我的应用程序和Perfmon共享的性能监视器计数器(当它运行时),所以安装它应该只是为了确保应用程序关闭。简单...除了一个驱动程序(不记得哪一个或我的名字,耻辱制造商)加载每个perfmon对象DLL并保持它们全部锁定。因此,我的应用需要重启。

Now, if you have a tool that can determine which processes have which of your to-be-installed files locked, and offer to close them though the user must get to decide, one of those processes might be important to Windows (eg workstation service, or a svchost) or important to the user (eg Word with a day's worth of unsaved work)(that's probably a bad example).

现在,如果您有一个工具可以确定哪些进程已锁定您要安装的文件,并提供关闭它们虽然用户必须决定,其中一个进程可能对Windows很重要(例如工作站服务或者svchost)或对用户很重要(例如,Word有一天的未保存工作)(这可能是一个不好的例子)。

#7


Use the reboot option instead of refreshing explorer.exe. It's expected already, most software installs on Windows use a reboot so users are accustomed to rebooting when installing software and it gives them a chance to close down any other windows and save data. Secondly, as already pointed out, rebooting explorer.exe blanks your current screen without warning and makes it appear as though something has gone wrong and all their information is lost.

使用reboot选项而不是刷新explorer.exe。已经预料到,Windows上的大多数软件安装使用重启,因此用户习惯于在安装软件时重新启动,这使他们有机会关闭任何其他窗口并保存数据。其次,正如已经指出的那样,重新启动explorer.exe会在没有警告的情况下清空当前屏幕,并使其看起来好像出现问题并且所有信息都丢失了。

#8


There are quite a few things that get done in the registry for installed things that occur at next reboot; for example, entries under the "RunOnce" key get run, well, once, at the next boot. There are a lot of installation applications that have dependency upon this behavior; and because Microsoft hasn't deprecated the functionality or found a good workaround, people keep writing software the expects this functionality and depends upon it.

在注册表中有很多事情要做,以便在下次重启时发生安装;例如,“RunOnce”键下的条目会在下次引导时运行一次。有很多安装应用程序依赖于这种行为;并且由于Microsoft没有弃用该功能或​​找到了一个好的解决方法,人们一直在编写期望此功能并依赖于它的软件。

#9


Restarting explorer has the unfortunate side-effect of scrapping the user's current environment. Things like task bar buttons, pending operations, and the like will all be lost if you simply kill explorer.exe.

重新启动资源管理器具有废弃用户当前环境的不幸副作用。如果您只是杀死explorer.exe,那么任务栏按钮,待处理操作等内容都将丢失。

#10


Why not let the user choose whether to to reboot or restart explorer.

为什么不让用户选择是重启还是重启资源管理器。

Remember though that the average user won't know what that means or entails so make sure your users really are 'technical enough'.

请记住,普通用户不会知道这意味着什么或需要什么,因此请确保您的用户确实“足够技术”。

#1


Killing and restarting explorer is not going to do everything that a restart of the system will do:

杀死并重新启动资源管理器不会执行重新启动系统将执行的所有操作:

1) Any currently running application will not get refreshed.

1)任何当前正在运行的应用程序都不会刷新。

2) This can lead to stability problems on the system, as well. I've, in particular, noticed problems with my graphics driver not getting updated correctly after an explorer shutdown/restart.

2)这也可能导致系统的稳定性问题。我特别注意到在浏览器关闭/重启后我的图形驱动程序无法正确更新的问题。

3) It just kind of smells ;) Killing a process as part of an install just seems nasty.

3)它只是一种气味;)作为安装的一部分杀死一个进程似乎很讨厌。

#2


I've seen problems with icons in the notification area not showing up after explorer has restarted (usually after it stops responding and I have to kill it).

我已经看到通知区域中的图标问题在资源管理器重新启动后没有出现(通常在它停止响应后我必须杀死它)。

Depending on the notification icon, this could cause the user problems.

根据通知图标,这可能会导致用户出现问题。

#3


Rebooting Windows is a very well-tested operation. Log out/in is too. You can expect all third-party software has been tested through a restart, and almost all has been tested through log out, log in.

重新启动Windows是一项经过严格测试的操作。退出/退出也是。您可以预期所有第三方软件都已通过重启进行测试,几乎所有第三方软件都已通过注销进行测试,登录。

How much of it do you think is tested through kill & respawn explorer.exe? Probably nowhere near as much, and certainly nowhere near as thoroughly.

您认为通过kill&respawn explorer.exe测试了多少?可能远没有那么多,当然也没有那么彻底。

So, if you're distributing internally, to a very well-controlled environment, sure, go ahead and kill & respawn explorer.exe. But don't do it otherwise, as you're putting the user's machine into a very poorly tested state, and things may mysteriously break until (s)he reboots.

所以,如果你在内部分发,在一个控制良好的环境中,请确保继续杀死并重新生成explorer.exe。但是不要这样做,因为你将用户的机器置于一个非常糟糕的测试状态,并且事情可能会神秘地破坏,直到他重新启动。

#4


It is possible that other changes have been made that require more than a restart of explorer.exe. Also as you said, restarting explorer.exe can be quite alarming for end-users.

有可能进行了其他更改,需要重新启动explorer.exe。另外正如您所说,重新启动explorer.exe对于最终用户来说可能会非常惊人。

#5


The explorer can have unsaved state (open windows, folder view settings, etc) which are lost if it suddenly restarts). I'd hate it if an installer would kill my explorer.exe without asking and I'm not sure I would think it an improvement over just rebooting.

资源管理器可以具有未保存状态(打开窗口,文件夹视图设置等),如果突然重新启动,则会丢失该状态。我讨厌它,如果安装程序会在没有询问的情况下杀死我的explorer.exe而且我不确定我是否会认为这只是重新启动的改进。

On the list of things that are not handled by restarting the explorer.exe are especially replacing DLLs which are currently in use and programs (beyond the explorer.exe) that do not listen to the registry change events but hold information from there.

在重新启动explorer.exe未处理的事项列表中,特别是替换当前正在使用的DLL和不监听注册表更改事件但保存信息的程序(在explorer.exe之外)。

#6


Is it always explorer that needs to be restarted?

是否总是需要重新启动资源管理器?

I had an app once that installed a performance monitor counter that should have been shared by my app and Perfmon (when it was running) so installing it should be just to make sure either app was closed. Simples... except for a driver (can't remember which one or I'd name n shame the manufacturer) that loaded every perfmon object dll and kept them all locked. As a result, my app required a reboot.

我有一个应用程序,安装了一个应该由我的应用程序和Perfmon共享的性能监视器计数器(当它运行时),所以安装它应该只是为了确保应用程序关闭。简单...除了一个驱动程序(不记得哪一个或我的名字,耻辱制造商)加载每个perfmon对象DLL并保持它们全部锁定。因此,我的应用需要重启。

Now, if you have a tool that can determine which processes have which of your to-be-installed files locked, and offer to close them though the user must get to decide, one of those processes might be important to Windows (eg workstation service, or a svchost) or important to the user (eg Word with a day's worth of unsaved work)(that's probably a bad example).

现在,如果您有一个工具可以确定哪些进程已锁定您要安装的文件,并提供关闭它们虽然用户必须决定,其中一个进程可能对Windows很重要(例如工作站服务或者svchost)或对用户很重要(例如,Word有一天的未保存工作)(这可能是一个不好的例子)。

#7


Use the reboot option instead of refreshing explorer.exe. It's expected already, most software installs on Windows use a reboot so users are accustomed to rebooting when installing software and it gives them a chance to close down any other windows and save data. Secondly, as already pointed out, rebooting explorer.exe blanks your current screen without warning and makes it appear as though something has gone wrong and all their information is lost.

使用reboot选项而不是刷新explorer.exe。已经预料到,Windows上的大多数软件安装使用重启,因此用户习惯于在安装软件时重新启动,这使他们有机会关闭任何其他窗口并保存数据。其次,正如已经指出的那样,重新启动explorer.exe会在没有警告的情况下清空当前屏幕,并使其看起来好像出现问题并且所有信息都丢失了。

#8


There are quite a few things that get done in the registry for installed things that occur at next reboot; for example, entries under the "RunOnce" key get run, well, once, at the next boot. There are a lot of installation applications that have dependency upon this behavior; and because Microsoft hasn't deprecated the functionality or found a good workaround, people keep writing software the expects this functionality and depends upon it.

在注册表中有很多事情要做,以便在下次重启时发生安装;例如,“RunOnce”键下的条目会在下次引导时运行一次。有很多安装应用程序依赖于这种行为;并且由于Microsoft没有弃用该功能或​​找到了一个好的解决方法,人们一直在编写期望此功能并依赖于它的软件。

#9


Restarting explorer has the unfortunate side-effect of scrapping the user's current environment. Things like task bar buttons, pending operations, and the like will all be lost if you simply kill explorer.exe.

重新启动资源管理器具有废弃用户当前环境的不幸副作用。如果您只是杀死explorer.exe,那么任务栏按钮,待处理操作等内容都将丢失。

#10


Why not let the user choose whether to to reboot or restart explorer.

为什么不让用户选择是重启还是重启资源管理器。

Remember though that the average user won't know what that means or entails so make sure your users really are 'technical enough'.

请记住,普通用户不会知道这意味着什么或需要什么,因此请确保您的用户确实“足够技术”。