I packaged a Win32 console app into an MSIX package. Everything works fine on Win 10. I can also install it on Windows Server 2019, but have no way of running it there from the console by calling the alias or any other means.
- The app is installed in C:\Program Files\WindowsApps\stackmuncher_1.1.1.0_x64__eqf80b1s88fx6
- There is an alias for it in C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps as a zero-length file
- I can run the app if I copy the executable from C:\Program Files\WindowsApps\stackmuncher_1.1.1.0_x64__eqf80b1s88fx6 to any other folder
- The alias is showing in Settings > App Execution Aliases
If I try to run the app by its alias stackmuncher.exe
from PS or CMD terminal I get a "not found" message.
I added %userprofile%\AppData\Local\Microsoft\WindowsApps
to system Path
variable and got a different error:
Program 'stackmuncher.exe' failed to run: The specified executable is not a valid application for this OS platform
It seems that the app was installed and all the files it needs to function properly are there.
How can I run it using an alias or in any other way?
Package info
PS C:\rust\stm> get-appxpackage | Where-Object { $_.Name -like "*stackmuncher*" }
Name : stackmuncher
Publisher : CN=stackmuncher, C=NZ
Architecture : X64
ResourceId :
Version : 1.1.1.0
PackageFullName : stackmuncher_1.1.1.0_x64__eqf80b1s88fx6
InstallLocation : C:\Program Files\WindowsApps\stackmuncher_1.1.1.0_x64__eqf80b1s88fx6
IsFramework : False
PackageFamilyName : stackmuncher_eqf80b1s88fx6
PublisherId : eqf80b1s88fx6
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Developer
Status : Ok
AppManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
>
<Identity Name="stackmuncher" Version="1.1.1.0" Publisher="CN=stackmuncher, C=NZ" ProcessorArchitecture="x64" />
<Properties>
<DisplayName>stackmuncher</DisplayName>
<PublisherDisplayName>stackmuncher</PublisherDisplayName>
<Description>stackmuncher app</Description>
<Logo>150.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.15063.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust"/>
</Capabilities>
<Applications>
<Application Id="stackmuncher" Executable="stackmuncher.exe" EntryPoint="Windows.PartialTrustApplication">
<uap:VisualElements DisplayName="stackmuncher" Description="stackmuncher app" Square150x150Logo="150.png" Square44x44Logo="44.png" BackgroundColor="#999999" />
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias" EntryPoint="Windows.FullTrustApplication" Executable="stackmuncher.exe">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="stackmuncher.exe"/>
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
</Application>
</Applications>
</Package>
Full error message
PS C:\> stackmuncher.exe
Program 'stackmuncher.exe' failed to run: The specified executable is not a valid application for this OS platform.At
line:1 char:1
+ stackmuncher.exe
+ ~~~~~~~~~~~~~~~~.
At line:1 char:1
+ stackmuncher.exe
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
- Installer: https://distro.stackmuncher.com/msix/stackmuncher.msix
- Self-signed cert: https://distro.stackmuncher.com/stm.cer