WiX - 注册 ComPlus 应用程序并为组件分配角色 [英] WiX - Register ComPlus application and Assigning a role to a component

查看:18
本文介绍了WiX - 注册 ComPlus 应用程序并为组件分配角色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的安装程序正确注册了我的 COMPLus 组件.我还有最后一个要求:强制执行组件级访问检查在角色下勾选用户"角色.

I have my installer registering my COMPLus component correctly. I have one last requirement to: Enforce component level access checks Under Roles have the "User" Role ticked.

我尝试添加一个 complus:ComPlusCompoent 作为我的 ComPlusAssembly 的子项,但是当我这样做时,安装程​​序失败并出现错误.(见下文)我不确定我应该把什么作为 CLSID,也许这就是导致问题的原因?谁能帮我吗?解释我应该为 CLSID 添加什么内容?

I tried adding a complus:ComPlusCompoent as a child of my ComPlusAssembly but when I do this the installer fails with an error. (See below) I am not sure what I should put as the CLSID, perhaps this is what is causing the issue? Can anyone help me out? Explain what I should be putting for the CLSID?

下面的错误和 WiX 代码段笔记:如果我删除了 complus:ComPlusComponent 元素,则安装程序可以正常工作:我的用户ComponentUser"被定义得更高.角色和用户在组件中已分配但未打勾.

Error and WiX snippet below Note: If I remove the complus:ComPlusComponent element then the installer works fine: My User ‘ComponentUser" is defined higher up. The role and user are assigned in the component but not ticked.

MSI (s) (68:BC) [16:25:08:579]:调用远程自定义操作.DLL:C:\Windows\Installer\MSICE31.tmp,入口点:ComPlusInstallExecuteCommit行动 16:25:08:RegisterComPlusAssemblies.注册 COM+ 组件RegisterComPlusAssemblies: DLL: C:\NTApps\MyComPlusCore\ASA.DA.Insurance.dllComPlusInstallExecuteCommit:错误 0x80070490:未能找到组件对象ComPlusInstallExecuteCommit:错误 0x80070490:无法配置组件ComPlusInstallExecuteCommit:错误 0x80070490:无法注册程序集,密钥:ASA.DA.InsuranceComPlusInstallExecuteCommit:错误 0x80070490:无法注册程序集

MSI (s) (68:BC) [16:25:08:579]: Invoking remote custom action. DLL: C:\Windows\Installer\MSICE31.tmp, Entrypoint: ComPlusInstallExecuteCommit Action 16:25:08: RegisterComPlusAssemblies. Registering COM+ components RegisterComPlusAssemblies: DLL: C:\NTApps\MyComPlusCore\ASA.DA.Insurance.dll ComPlusInstallExecuteCommit: Error 0x80070490: Failed to find component object ComPlusInstallExecuteCommit: Error 0x80070490: Failed to configure components ComPlusInstallExecuteCommit: Error 0x80070490: Failed to register assembly, key: ASA.DA.Insurance ComPlusInstallExecuteCommit: Error 0x80070490: Failed to register assemblies

<complus:ComPlusApplication Id="ASA.NETCoreData3" 
                        Name="ASA.NETCoreData3" 
                        Description="ASA .NET Core Data Components"
                        ApplicationAccessChecksEnabled="yes"
                        AccessChecksLevel="applicationComponentLevel"
                        Authentication="packet"
                        ImpersonationLevel="impersonate"
                        Activation="inproc">

    <complus:ComPlusApplicationRole Id="ASA.NETCoreData3.Role" 
                                Name ="User">
        <complus:ComPlusUserInApplicationRole Id="ASA.NETCoreData3.User" 
                                            User="ComponentUser" />
    </complus:ComPlusApplicationRole>

    <complus:ComPlusAssembly Id="ASA.DA.Insurance" 
                            DllPath="[#ASA.DA.Insurance_dll]"
                            Type="native"
                            RegisterInCommit="yes">
        <complus:ComPlusComponent Id="ASA.DA.Insurance.Com"
                                CLSID="f8a83c94-9ab1-4c4d-8ebc-901aa747ac33"
                                Description="ASA.DA.Insurance.AppInsurance" 
                                ComponentAccessChecksEnabled="yes" >
            <complus:ComPlusRoleForComponent Id="ASA.DA.Insurance.Role" 
                                            ApplicationRole="ASA.NETCoreData3.Role" />
        </complus:ComPlusComponent>
    </complus:ComPlusAssembly>
</complus:ComPlusApplication>

推荐答案

是的,它是 CLSID.在此组件的先前安装程序中,使用了 vb 脚本,项目不需要静态 CLSID,因此在项目中指定.

Yes it was the CLSID. In the previous installers for this compoenet a vb script was used and the projects did not need a static CLSID and so it was specified in the projects.

我需要向具体类添加 Guid 属性,然后在 WiX ComPlusComponent clsid 中​​使用此 guid.

I needed to add a Guid attribute to the concrete class and then use this guid in the WiX ComPlusComponent clsid.

希望这对某人有所帮助.

Hope this helps someone.

这篇关于WiX - 注册 ComPlus 应用程序并为组件分配角色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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