Forum Discussion
davidanthoff
Aug 17, 2024Brass Contributor
Execution alias for hosted application
I am trying to create a hosted application (i.e. with a HostId attribute) with an execution alias. The hosted application in general works, i.e. I can launch it from the start menu link that is generated. The execution alias is being generated, but when I try to run it I get an error saying
PS> foobarasdf.exe
ResourceUnavailable: Program 'foobarasdf.exe' failed to run: An error occurred trying to start process 'C:\Users\david\AppData\Local\Microsoft\WindowsApps\foobarasdf.exe' with working directory 'C:\Users\david\source\juliaup'. The file cann
ot be accessed by the system.At line:1 char:1 + foobarasdf.exe
+ ~~~~~~~~~~~~~~.
The app manifest that I'm using is this
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap uap10 rescap build"
xmlns:build="http://schemas.microsoft.com/developer/appx/2015/build">
<Identity Name="StringBuildersManifest"
Publisher="CN=Julialang, OID.2.25.311729368913984317654407730594956997722=1"
Version="1.0.0.6" />
<Properties>
<DisplayName>Number Guesser (Manifest)</DisplayName>
<PublisherDisplayName>AppModelSamples</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.19041.0" MaxVersionTested="10.0.19041.0" />
<uap10:HostRuntimeDependency Name="JuliaHubInc.JuliaDev" Publisher="CN="JuliaHub, Inc.", O="JuliaHub, Inc.", L=CAMBRIDGE, S=Massachusetts, C=US" MinVersion="1.0.0.0"/>
</Dependencies>
<Applications>
<Application Id="StringBuildersApp"
uap10:HostId="JuliaHost"
uap10:Parameters="--project=C:\Users\david\.julia\dev\StringBuilders\app">
<uap:VisualElements
DisplayName="Stringbuilders"
Description="Stringbuilders is a high-level, high-performance, dynamic programming language"
BackgroundColor="transparent"
Square150x150Logo="Images\Square150x150Logo.png"
Square44x44Logo="Images\Square44x44Logo.png">
<uap:DefaultTile
Wide310x150Logo="Images\Wide310x150Logo.png"
ShortName="Julia"
Square71x71Logo="Images\SmallTile.png"
Square310x310Logo="Images\LargeTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
<uap:ShowOn Tile="wide310x150Logo"/>
<uap:ShowOn Tile="square310x310Logo"/>
</uap:ShowNameOnTiles>
</uap:DefaultTile >
<uap:SplashScreen Image="Images\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<uap5:Extension Category="windows.appExecutionAlias">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="foobarasdf.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="unvirtualizedResources"/>
</Capabilities>
</Package>
Should this kind of approach in general work? Any hints what I'm doing wrong would be greatly appreciated!
3 Replies
- I don't really do things with HostedApps, but hear is a guess.
It is possible that the uap10:parameters are not being used when started via the executionalias.
You should trace the activity of the alias launch to see if that is the case. If so, you probably want to try putting in a launcher exe application in the package to perform the hosted launch.- davidanthoffBrass Contributor> You should trace the activity of the alias launch to see if that is the case.
How can I do that?
> If so, you probably want to try putting in a launcher exe application in the package to perform the hosted launch.
That is unfortunately not an option: I am using the hosted apps because they can be unsigned, but only if they don't contain binaries...- Again, Hosted Apps not my thing...
1 - TRACING. Probably ProcessMonitor on the user machine. I'm not sure how the mechanism works. If not that, then a protocol trace (like Fiddler) might show you.
2 - Well if you signed the package you could ;).
It would be a good thing to trace from the shortcut and from the alias. If the parameters are missing, you then have solid documentation to provide as feedback to Microsoft.