gpt4 book ai didi

com - MSIX -> COM 服务器的本地激活权限

转载 作者:行者123 更新时间:2023-12-04 15:22:31 28 4
gpt4 key购买 nike

我的包以旁加载方式安装,并不断遇到特定于应用程序的权限错误。

是的,许多人建议在 regedit 和组件服务中手动更改权限和所有者。

我的应用实际上在组件服务(DCOMCNFG、DCOMCNFG -32)下的 DCOM 配置中丢失。

我在过程监视器中既没有看到错误也没有看到警告。在这种情况下我如何授予权限,为什么 MSIX 安装程序没有完成此特定任务?

The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID 

{2593F8B9-4EAF-457C-B68A-50F6B8EA6B54}

and APPID

{15C20B67-12E7-4BB6-92BB-7AFF07997402}

to the user PRECISION\Tommy SID (S-1-5-21-3771326467-2290839719-591499861-1001) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.

我尝试使用此 PS 模块授予 DCOM 权限,但无济于事:

Grant, Revoke, Get DCOM permissions using PowerShell

Import-Module .\DCOMPermissions

Grant-DCOMPermission -ApplicationID "{9CA88EE3-ACB7-47C8-AFC4-AB702511C276}" -Account "SYSTEM" -Type Launch -Permissions LocalLaunch,LocalActivation -OverrideConfigurationPermissions

继续观察事件查看器中的错误,这会阻止我的应用启动:

Event Viewer exhibiting the error ID 10010

我在这个 AppxManifest.xml 的帮助下构建了 MSIX 包

    <?xml version="1.0" encoding="utf-8"?>
<Package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10">
<Identity Name="WeatherHistory" Version="0.7.0.2" Publisher="CN=Contoso Software, O=Contoso Corporation, C=US" />
<Properties>
<DisplayName>Weather History</DisplayName>
<PublisherDisplayName>Cosmic ray</PublisherDisplayName>
<Logo>Images/satelite.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.18363.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.18363.0" />
</Dependencies>
<Resources>
<Resource Language="en-us" />
</Resources>
<Applications>
<Application Id="Weather.History" Executable="Weather.History.Splash.exe" EntryPoint="Weather.History.Splash">
<VisualElements DisplayName="Weather History" Description="Frontend" Square150x150Logo="Images/satelite.png" Square44x44Logo="Images/satelite.png" BackgroundColor="yellow" xmlns="http://schemas.microsoft.com/appx/manifest/uap/windows10" />
<Extensions>
<Extension Category="windows.fullTrustProcess" Executable="Weather.History.Stylet.exe" xmlns="http://schemas.microsoft.com/appx/manifest/desktop/windows10" />
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="runFullTrust" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" />
<Capability Name="internetClient" />
</Capabilities>
</Package>

... 并将代码添加到我的包入口点 exe 中

private async void LaunchProduct()
{
try
{
if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
else
{
Exit($"Your Windows version is not supported.");
}
}
catch (Exception e)
{
Exit("Failed to launch Weather History", e);
}
}

有一个 WPF 飞溅尝试启动另一个 WPF,两者都基于通用的 TFM .NET 4.7。第一个 WPF 应该启动第二个作为利用此 MSIX 包扩展基础结构的受信任进程。 Pro boostrapper 机制。如果我的看法是正确的。

这不是一个包包,那么我的包实际上针对什么架构?我总是编译任何 CPU。

我最终通过调用相应的工具来构建包:

makeappx.exe pack /v /o /f mapping.map /m Appxmanifest.xml /p ./Weather.History.msix

最佳答案

The EntryPoint indeed must be designated as trusted.

EntryPoint="Windows.FullTrustApplication"

关于com - MSIX -> COM 服务器的本地激活权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62999208/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com