为什么普通软件卸载无法从注册表中删除所有相关值?

当您卸载一个程序时,“合理的”期望是从您的系统中删除它的所有痕迹,但事实往往不是这样。为什么?今天的超级用户问答帖子回答了一位好奇的读者的问题。...

为什么普通软件卸载无法从注册表中删除所有相关值?

当您卸载一个程序时,“合理的”期望是从您的系统中删除它的所有痕迹,但事实往往不是这样。为什么?今天的超级用户问答帖子回答了一位好奇的读者的问题。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

由wandersick(Flickr)提供的屏幕截图。

问题

超级用户读者Mark Boulder想知道为什么在正常软件卸载后,某些注册表值始终保留:

Expanding on the SuperUser topic How do I remove residual traces of uninstalled software from the registry, why is it that every time I uninstall a program and then later look it up via RegEdit, it is still there?

Why are the majority of Windows applicati*** so intent on leaving tiny little traces of themselves in the registry? Does the fault lie with Windows or with the developers?

为什么在正常卸载软件后注册表值通常被“留下”?

答案

超级用户贡献者Lukas Rieger和Keltari为我们提供了答案。首先,卢卡斯·里格尔:

Because it is impossible. The registry has multiple root nodes but only two interesting ones: LocalMachine and CurrentUser. Normally, the setup writes values into LocalMachine, and the running program only writes into CurrentUser (actually, unless the setup messes with the permissi***, the running program cannot write into LocalMachine).

While keeping leftovers in LocalMachine is laziness (as pointed out by the other answers), it is not possible to clean the CurrentUser part.

If a program is installed per machine (which most are) and multiple users use it, what should the uninstaller do? It could safely remove the user settings of the current account, but the current account might not be your account. This happens if you started the uninstaller from a non-admin account and then entered the credentials of an admin account, the setup is now running under that account, not the first one.

What about the other users? It could try to enumerate all users, but their registry keys might not be loaded (Windows is lazy and only loads the things it needs).

But you should not even try that. If you use roaming profiles (i.e. terminal services) and then delete all settings on uninstall, you could really mess up and delete stuff that is actually still in use. A terminal server is basically one Windows machine where multiple users log-in at the same time and use applicati***. Say you have two terminal servers running one application. You uninstall the application on TS1, now all the settings for all users are gone on TS2 because you have roaming profiles. Oops.

The same also applies to files in the per-user directories. In the setup of my company’s programs, I delete the per-machine stuff but do not touch the per-user stuff, not even of the user currently running the setup.

接着是凯尔塔里的回答:

There are many reas*** why this is the case, however, it is not the fault of Microsoft or the Windows operating system.

The following is a list of some cases and reas*** why registry entries are left behind:

Bad Programming – The developer did not write the application uninstaller properly and the registry entries are left behind. In addition to that, the uninstaller might not have/use the proper permissi*** to remove the registry entries. It could also be that there is more than one application that uses those keys. For instance, two applicati*** from the same developer that write to the same keys.

Left On Purpose – As one comment mentioned, these entries could have been left on purpose. Some applicati*** have a trial period and, after that period, you might choose to remove the application. If you choose to reinstall the application later, those keys give the application information on when it was installed. In addition to that, some developers might choose to leave those keys in case you choose to reinstall the application. If the developer used registry keys to store your customizati***, they might leave them there so that when you reinstall the application, all of your customizati*** persist. In the grand scheme of things, registry keys only take up a few bytes.

Should you remove the keys? That depends. The Windows registry is a dangerous place to mess around in. You can inadvertently break your system. Leaving the extraneous keys will not hurt the system. Some people will say cleaning/defragging the registry will speed up your system, but that has been proven false repeatedly.

If you really want to get rid of those programs, there are some uninstaller tools that can remove every trace of a program. These programs will watch the installer of another program and record all the acti*** done to the file system and registry, then completely remove those acti***. One issue with these tools is that it is possible they can remove things you might want to keep.


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-10 19:10
  • 阅读 ( 187 )
  • 分类:互联网

你可能感兴趣的文章

如何在windows上卸载应用程序(不留下剩余的垃圾数据)

...志数据库,它可以在卸载之前对数据进行分析。它知道在注册表或磁盘中扫描任何剩余的内容。 ...

  • 发布于 2021-03-20 19:27
  • 阅读 ( 299 )

cleanmypc可满足您所有的pc维护需求

... 注册表维护 ...

  • 发布于 2021-03-24 22:48
  • 阅读 ( 183 )

nch软件有什么问题?如何删除?

...时,软件版本的变化。你可以找到许多论坛帖子,想知道为什么某个软件在更新后拒绝接受付费许可证。 ...

  • 发布于 2021-03-25 08:57
  • 阅读 ( 359 )

如何解决windows10中rpc服务器不可用的错误

... 5更改注册表设置 ...

  • 发布于 2021-03-26 15:34
  • 阅读 ( 297 )

修复windows中的“此设备无法启动,代码10”错误

... 7删除注册表中的upperfilters和lowerfilters ...

  • 发布于 2021-03-30 06:10
  • 阅读 ( 262 )

如何从命令提示符编辑windows注册表

Windows和许多第三方应用程序在注册表中存储设置。如果你想编辑注册表,有几种方法可以做到。下面是如何从命令提示符编辑Windows注册表。 在我们开始之前,在进行任何编辑之前,备份注册表和计算机是很重要的。一个错误...

  • 发布于 2021-04-02 01:30
  • 阅读 ( 152 )

如何删除windows上的chrome扩展“由企业策略安装”

...理员来管理您机器上的这些类型的设置和扩展。 相关:为什么Chrome说它是“由你的组织管理的?” 不幸的是,如果您不是企业的一部分,或者没有管理您的计算机的管理员,这些扩展可以在您的系统上找到其他方法并授予自己...

  • 发布于 2021-04-03 16:45
  • 阅读 ( 218 )

如何从windows卸载程序列表中手动删除程序

...它吗? 不管是什么创建了幻像条目,都可以通过对Windows注册表进行一些快速编辑或使用流行的CCleaner应用程序为您执行任务来轻松删除。无论如何,先试试CCleaner方法,因为它速度快而且非常简单。如果,不管出于什么原因,它...

  • 发布于 2021-04-07 13:51
  • 阅读 ( 208 )

如何在windows 10上禁用onedrive并将其从文件资源管理器中删除

...略更改为“未配置”,而不是“启用” 似乎没有关联的注册表设置,您可以修改它以获得与Windows10上的组策略设置相同的效果。在Windows 8.1上运行的“DisableFileSync”和“DisableFileSyncNGSC”注册表设置在Windows 10上不再运行。 相关:...

  • 发布于 2021-04-07 22:11
  • 阅读 ( 232 )

如何阻止windows10自动更新硬件驱动程序

...安全更新或功能更新捆绑在一起。 家庭用户:通过编辑注册表停止驱动程序更新 在Windows 10 Home上,只能通过注册表更改此选项。如果您有Windows Pro或Enterprise,您也可以这样做,但是在注册表中工作比在组策略编辑器中工作更...

  • 发布于 2021-04-08 02:14
  • 阅读 ( 175 )
御沐成鱼
御沐成鱼

0 篇文章

相关推荐