DCOM安全使用批处理文件 [英] DCOM Security using a batch file
问题描述
是否有任何方法来改变使用批处理文件的COM安全的访问权限?
我需要写新值编辑限制...和编辑默认......在这两个访问权限和启动和激活权限使用批处理脚本。
我使用Windows XP机器带有Service Pack 2和3。
Are there any methods to change the Access Permissions for COM Security using a batch file? I need to write new values to "Edit Limits..." and "Edit Default..." in both "Access Permissions" and "Launch and Activation Permissions" using a batch script. I'm using Windows XP machines with Service Pack 2 and 3.
感谢您。
推荐答案
我最近有必要建立一个批处理脚本授予默认的本地激活权限,这样我可以运行在Windows Azure上的进程外的COM组件。经过反复研究,我使用了一种叫做工具 RegFromApp (下载链接页面的底部附近)看到在Windows注册表中所作的更改,当我授予的Windows Server 2008 R2的虚拟机在上述权限。下面是我用来确定如何更改对注册表的步骤...
I recently had the need to create a batch script to grant default Local Activation permissions so that I could run an out-of-process COM component on Windows Azure. After much research, I used a tool called RegFromApp (download link is near bottom of page) to see what changes were made in the Windows Registry when I granted the aforementioned permissions on a Windows Server 2008 R2 VM. Here are the steps I used to determine what changes to make to the registry...
- 进入
DCOMCNFG
在命令提示符下启动组件
服务 - 推出 RegFromApp 的程序
- 在RegFromApp,选择 MMC.EXE 的工艺,并点击的确定的以检查什么样的变化会令注册表
- 早在组件服务,扩大 组件服务的在左侧面板项目
- 扩展 计算机的在左侧面板项目
- 右键单击 我的电脑的在左侧面板项目,并选择的属性的
从弹出菜单中 - 选 COM安全的标签
- 在 启动和激活权限的框中,单击 编辑默认的
按钮 - 单击的 添加的按钮
- 进入
IIS_IUSRS
的空盒子,单击的检查名称的按钮和
单击的确定的按钮 - 选中 允许的为 本地激活的并单击的确定的按钮
- 单击的 应用的按钮和的确定的按钮
- 早在RegFromApp程序,单击 另存为的从文件菜单中保存的注册表
变化SetDCOMPermission.reg
文件
- Entered
dcomcnfg
in the Command Prompt to launch Component Services - Launched RegFromApp program
- In RegFromApp, selected the mmc.exe process and clicked OK to inspect what changes it would make to registry
- Back in Component Services, expanded Component Services item in left panel
- Expanded Computers item in left panel
- Right-clicked My Computer item in left panel and selected Properties from popup menu
- Selected COM Security tab
- In Launch and Activation Permissions box, clicked Edit Default button
- Clicked Add button
- Entered
IIS_IUSRS
in empty box, clicked Check Names button and clicked OK button - Ticked Allow for Local Activation and clicked OK button
- Clicked Apply button then OK button
- Back in RegFromApp program, clicked Save As from the File menu to save registry
changes as
SetDCOMPermission.reg
file
已经记录在一个.reg文件(注册表更改,即在的 DefaultLaunchPermission 的值在 [HKEY_LOCAL_MACHINE \\ SOFTWARE \\微软\\ OLE修改] 的键),我写了下面批处理脚本来注册我的COM组件,并通过运行我的.reg文件应用更改注册表...
Having recorded the registry changes in a .reg file (i.e. the DefaultLaunchPermission value was modified in the [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLE] key), I wrote the following batch script to register my COM component and apply the changes to the registry by running my .reg file...
chcp 1252>NUL
OleAutomationFeasibilityModel.exe /regserver
regedit.exe /s SetDCOMPermission.reg
exit /b 0
我敢肯定,你可以使用类似的技术来记录你想在一个.reg文件来实现,并运行一个批处理脚本文件有什么必要的注册表更改。
I'm sure you could use a similar technique to record the necessary registry changes for what you're trying to achieve in a .reg file and run this file from a batch script.
希望帮助!
这篇关于DCOM安全使用批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!