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



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

是的,许多人建议在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 PRECISIONTommy 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权限,但没有用:

使用PowerShell 授予、吊销、获取DCOM权限

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

继续在事件查看器中看到错误,这将禁止我的应用程序启动:

显示错误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。净4.7。第一个WPF应该将第二个WPF作为一个可信任的进程来启动,利用这个MSIX包扩展基础设施。Pro助推器机构。如果我的看法是正确的。

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

我最终通过调用相应的工具来构建包,如下所示:

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

EntryPoint确实必须指定为可信。

EntryPoint="Windows.FullTrustApplication"

最新更新