Forum Discussion
MSIX -> Local Activation permission for COM
Though a direct exe launch from the directory is flawless. It must relate to how a store app is launched. Is any1 here exceling MSIX/APPX deployment duties ?
Sigmarsson You might need to go back to square one and describe how the package was created. Most likely, the issue starts there. Although it is entirely possible that you need the tooling to add support for your scenario, I don't think we'll figure it out from the deployment side.
- SigmarssonJul 17, 2020Copper ContributorThanks Timothy for engaging.
I strived to compose a minimalist AppxManifest.xml before package compilation, which I wish to share with you for a quick review.
<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.1" Publisher="CN=Contoso Software, O=Contoso Corporation, C=US"/>
<Properties>
<DisplayName>Weather History</DisplayName>
<PublisherDisplayName>Tommy</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.Bootstrapper">
<VisualElements xmlns="http://schemas.microsoft.com/appx/manifest/uap/windows10" DisplayName="Weather History" Description="Frontend" Square150x150Logo="Images/satelite.png" Square44x44Logo="Images/satelite.png" BackgroundColor="yellow"/>
</Application>
</Applications>
</Package>- Jul 17, 2020
Sigmarsson MSIX apps including desktop components need the following included in the manifest:
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
...
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>- SigmarssonJul 19, 2020Copper Contributor
I followed through what you advised but to no avail.
1. I altered the AppxManifest.xml (format and namespace its a bit different, it has been serialized by a CI tool) as
<?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>
2. Added code to the bootstrapper ap as *Splash.exe as
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); } }
I witness the same errors in the Event Viewer as earler. For some reason the Splash.exe is not even starting, hence it has no chance to launch the proc I specified as fullTrustProcess.
None of these are UWP. WPF. I referenced further assemblies as:
- C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.18362.0\Windows.winmd
- C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore\v4.5\System.Runtime.WindowsRuntime.dll
The package itself has already the capabilities you advised to include:
- SigmarssonJul 17, 2020Copper ContributorAs the next step I fabricate a mapping file so that the dir layout exhibits some order. The last invocations are :
makeappx.exe pack /v /o /f mapping.map /m Appxmanifest.xml /p ./Weather.History.msix
SignTool.exe sign /fd SHA256 /a /f devcert.pfx /p certpwd ./Weather.History.msix
Maybe the devcert puts a crimp on the exe launch...- SigmarssonJul 17, 2020Copper ContributorBtw what yet strange is that upon app start it shows an empty window for a while until it gives up that daft DCOM action. But thats window is not supposed to be the entry point exe just judging by the window dimensions. Im launching a 240x240 window and that is much bigger.