作为一个技术极客,我讨厌我的Windows机器不能完美运行。我想如果我不能让我的电脑完美运行,那我算什么技术人员?显然,试图让一切完美运行意味着要花费大量时间来解决可能不会对我的系统造成任何重大问题的问题。
但是,它仍然很有趣,您可以学到很多东西。在本文中,我将讨论修复在事件查看器中显示的与(Event Viewer)DistributedCOM相关的错误。我注意到我的系统(System)日志中除了每天都有几个事件 ID(Event ID)为10016的错误之外没有其他错误。基本的错误信息是一样的:
The application-specific permission settings do not grant Local Activation permission for the COM Server application
它还列出了CLSID、APPID、SID和一些关于使用(SID)组件(Component) 服务(Services)修改权限的内容。
在阅读了一些密集的论坛帖子后,我能够修复此错误,使其不再出现在Event Viewer中。这是一个相当漫长的过程,因此请确保在开始之前有一两个小时的空闲时间。
第 1 步 – 检查流程
我们要做的第一件事是找出哪个进程或服务与错误中列出的CLASS ID相关联。(CLASS ID)为此,请继续复制事件描述中列出的CLSID 。就我而言,它以{D63B10C5 开头({D63B10C5)。确保也复制两个花括号。
现在您需要通过单击开始并输入regedit打开注册表编辑器。打开注册表编辑器后,单击Edit,然后单击Find。继续将CLSID粘贴到搜索框中,然后按Enter。
一段时间后,您应该会在HK_CLASSES_ROOT\CLSID键下获得结果。在右侧,它应该有两个键,默认(Default)的应该列出服务的名称。就我而言,也可能是您的情况,它应该是RuntimeBroker。
AppID还应与错误消息中列出的内容相匹配。接下来,我们必须运行一个脚本,以便我们可以更改组件(Component) 服务(Services)中此服务的权限。
第 2 步 - 运行 PowerShell 脚本
为了解决这个问题,我们必须在组件(Component) 服务(Services)中为RuntimeBroker编辑一些权限,但在我们这样做之前,我们必须运行一个允许我们进行这些更改的脚本。
要以管理员(Administrator)身份运行PowerShell,您需要单击开始(Start),输入powershell,然后右键单击结果并选择以管理员身份运行( Run as administrator)。
现在继续下载此处链接的文本文件并复制所有代码并将其粘贴到PowerShell窗口中(如果您只是在(PowerShell)PowerShell窗口中单击鼠标右键,它将粘贴剪贴板中的任何内容)。然后只需按Enter 键(Enter),您应该会看到“完成(Done)”一词打印出来。
第 3 步 – 打开组件服务
您可以像在第 2 步中打开(Step 2)PowerShell一样打开组件服务(Component Services)。单击(Click)开始并(Start)输入组件服务。您不必以管理员身份运行此程序。到达那里后,导航到以下位置:
Component Services - Computers - My Computer - DCOM Config
向下滚动直到找到Runtime Broker。就我而言,有两个!你怎么知道错误中列出了哪一个?
右键单击它们中的每一个并选择Properties。在General选项卡上,您将看到Application ID,它应该与错误消息中的AppID匹配。(AppID)如果您在ID 为 10016 和多个CLSID的(CLSID)事件查看器(Event Viewer)中遇到错误,则可能需要修复两个RuntimeBrokers 。就我而言,我只需要修复一个。
第 4 步 - 正确的权限
最后,我们需要修改权限。在RuntimeBroker属性窗口中,单击安全(Security)选项卡。
Launch and Activation Permissions下的Edit按钮应该是可点击的。如果它显示为灰色,则PowerShell脚本未正常运行。单击编辑时,您可能会看到一个弹出对话框,警告您有关无法识别的权限。
在这里你不想点击Remove。只需单击取消(Cancel)按钮。现在您将看到默认帐户列表,并且您可能还会看到列出的帐户未知(Account Unknown)。
您要确保将“未知帐户”(Account Unknown)保持原样。不要删除它。此时,您应该留下ALL APPLICATION PACKAGES和SELF。现在我们必须添加两个帐户。单击Add并输入System然后单击Check Names。单击确定(OK),它将将该帐户添加到列表中。
再次单击添加(Add),这次输入本地服务(Local Service)并按照相同的步骤操作。
添加两者后,一次单击一个,然后选择Allow下的(Allow)Local Launch和Local Activation复选框。就是这样!现在继续并重新启动您的计算机,您应该不再看到该错误出现在事件视图(Event View)日志中。享受!
Fix Error 10016 in Windows Event Viewer
Being a big tech geek, I hate when my Windows machine isn’t working flawlessly. I figure if I can’t get my computer workіng perfeсtly, then what kind of tech person am I? Obviously, trying to get everything to work perfectly means spending a lot of tіme fixing issues that probably don’t caυse any major іssuеs with my sуstem.
However, it’s still fun and you get to learn a lot. In this article, I’m talking about fixing the error that shows up in Event Viewer related to DistributedCOM. I noticed I had no other errors in my System log other than a few every day with an Event ID of 10016. The basic error message was the same:
The application-specific permission settings do not grant Local Activation permission for the COM Server application
It also listed out a CLSID, an APPID, an SID and something about modifying permissions using Component Services.
After reading through some dense forum posts, I was able to fix this error so that it no longer appeared in the Event Viewer. It’s quite a process, so make sure you have an hour or two to spare before you start.
Step 1 – Check the Process
The first thing we have to do is figure out which process or service is associated with the CLASS ID listed in the error. To do this, go ahead and copy the CLSID listed in the event description. In my case, it started with {D63B10C5. Make sure to copy both the curly braces also.
Now you need to open the registry editor by clicking on start and typing in regedit. When you have the registry editor opened, click on Edit and then Find. Go ahead and paste the CLSID into the search box and press Enter.
After some time, you should get a result under the HK_CLASSES_ROOT\CLSID key. On the right-hand side, it should have two keys and the Default one should list out the name of the service. In my case and probably yours also, it should be RuntimeBroker.
The AppID should also match what is listed in the error message. Next, we have to run a script so that we can make changes to the permissions in Component Services for this service.
Step 2 – Run PowerShell Script
To fix this problem, we have to edit some permissions in Component Services for RuntimeBroker, but before we can do that we have to run a script that will allow us to make those changes.
To run PowerShell as an Administrator, you need to click on Start, type in powershell and then right-click on the result and choose Run as administrator.
Now go ahead and download the text file linked here and copy all the code and paste it into the PowerShell window (if you just right-click in the PowerShell window, it will paste whatever is in the clipboard). Then just press Enter and you should see the word Done printed out.
Step 3 – Open Component Services
You can open Component Services just like you opened PowerShell in Step 2. Click on Start and type in component services. You don’t have to run this program as administrator. Once there, navigate to the following location:
Component Services - Computers - My Computer - DCOM Config
Scroll down until you find Runtime Broker. In my case, there were two of them! How do you know which one is the listed in the error?
Right-click on each of them and choose Properties. On the General tab, you’ll see Application ID, which should match the AppID from the error message. If you are getting errors in Event Viewer with an ID of 10016 and more than one CLSID, then it could be that both RuntimeBrokers need to be fixed. In my case, I only had to fix one.
Step 4 – Correct Permissions
Lastly, we need to modify the permissions. While in the RuntimeBroker properties window, click on the Security tab.
The Edit button under Launch and Activation Permissions should be clickable. If it’s greyed out, the PowerShell script didn’t run properly. When you click on edit, you might see a popup dialog warning you about unrecognized permissions.
Here you DO NOT WANT to click on Remove. Simply click on the Cancel button. Now you’ll see a list of default accounts and you might also see an Account Unknown listed.
You want to make sure you leave the Account Unknown as is. Do not remove it. At this point, you should be left with ALL APPLICATION PACKAGES and SELF. Now we have to add two accounts. Click Add and type in System and then click on Check Names. Click OK and it will add that account to the list.
Click Add again and this time type in Local Service and follow the same steps.
Once both have been added, click on them one at a time and select the Local Launch and Local Activation checkboxes under Allow. That’s about it! Now go ahead and restart your computer and you should no longer see that error appear in the Event View logs. Enjoy!