更改组件服务中的访问权限> COM安全与脚本/ api? [英] change Access Permissions in Component Services > COM Security with script/api?

查看:290
本文介绍了更改组件服务中的访问权限> COM安全与脚本/ api?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有api来更改COM安全的访问权限?我需要写入新的值到编辑限制...和编辑默认值...。这些平凡的注册表设置?不能找到如何设置这些条目。

is there an api to change the Access Permissions for the COM Security? i need to write new values to "Edit Limits..." and "Edit Default...". are these plain registry settings? can't find how to set these entries.

推荐答案

快速回答是是他们是注册表设置,它们不是简单注册表设置。值是二进制的,并指向ACL结构。为了更改这些,您需要加载,更新和保存ACL(需要大量的代码)。 Windows SDK中的 DCOMPerm示例是体面的地方开始,我使用它作为一组类的基础,我在工作中使用来处理这个问题(不幸的是,我不能将该代码释放到公共领域)

The quick answer is Yes they are registry settings, the long answer is No they are not simple registry settings. The values are binary and point to an ACL structure. In order to change these you need to load, update, and save the ACL (which requires a fair amount of code). The DCOMPerm sample in the windows SDK is a decent place to start, i have used it as a basis for a set of classes i use at work to handle this problem (Unfortunately, i am not able to release that code into the public domain)

您可以查看 MSDN文档用于DCOM键结构 - 其涵盖计算机宽度设置。 COM应用程序特定设置存储在其APPID在注册表中的AccessPermission和LaunchPermission值。

You can review the MSDN Documentation for the DCOM key structure - that covers computer wide settings. COM application specific settings are stored under its APPID in the registry in the AccessPermission and LaunchPermission values.

请记住,修改机器范围设置的ACL可以快速呈现机器不能使用,如果你做错了。如果我记得正确,你可以简单地删除这些值(通过RegEdit),操作系统将恢复默认值,让你的机器回来...但我不是100%确定了。

Keep in mind that modifying the ACLs for the machine wide settings can quickly render your machine unusable if you do it incorrectly. If i remember correctly, you can simply delete the values (via RegEdit) and the OS will restore defaults to bring your machine back... but i'm not 100% certain on that anymore.

EDIT:二进制数据实际上是一个安全描述符,但最终它的包含的ACL需要处理 - SD只是在解包/打包时添加一层代码。

The binary data is actually a Security Descriptor, but ultimately its the contained ACL that needs to dealt with - the SD just adds one more layer of code when unpacking/packing it.

这篇关于更改组件服务中的访问权限> COM安全与脚本/ api?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆