私はDesktop to UWP Bridge、特にDesktop App Converterを使って変換したアプリを持っています。それは変換してうまくインストールされますが、実行しようとすると実行可能ファイルに仰角が必要であるというエラーが表示されます。私はRight Click -> Run as Administrator
でこれを解決することができますが、私はこの余分なステップが必要ないので、これをデフォルトとしてアプリを再パッケージしたいと思います。私は管理者特権なしで通常のインストールとしてアプリを実行できることは注目に値する、それはこれを必要とする変換されたアプリだけです。Windowsデスクトップブリッジで管理者として常に変換されたアプリケーションを実行していますか?
アプリの変換に関連するAppxManifest.xml
ファイルに必要な標高要求を含める方法はありますか?私は
<Application Id="MyApp" Permissions="Administrator">
がマニフェストhere上のドキュメントがあるような単純な何かがあるだろう期待していたが、私は権限や標高のレベルに関連する何かを見つけることができません。
これはコンバータによって生成されたAppxManifest.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:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10">
<Identity Name="MyApp" ProcessorArchitecture="x86" Publisher="CN=Me" Version="5.70.0.0" />
<Properties>
<DisplayName>MyApp</DisplayName>
<PublisherDisplayName>Me</PublisherDisplayName>
<Logo>Assets\AppStoreLogo.png</Logo>
</Properties>
<Resources>
<Resource Language="en-us" />
<Resource uap:Scale="100" />
<Resource uap:Scale="125" />
<Resource uap:Scale="150" />
<Resource uap:Scale="200" />
<Resource uap:Scale="400" />
</Resources>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
</Dependencies>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
<Applications>
<Application Id="MyApp" Executable="Integrator.exe" EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements DisplayName="MyApp" Description="MyApp" BackgroundColor="transparent" Square150x150Logo="Assets\AppMedTile.png" Square44x44Logo="Assets\AppList.png">
<uap:DefaultTile Wide310x150Logo="Assets\AppWideTile.png" Square310x310Logo="Assets\AppLargeTile.png" Square71x71Logo="Assets\AppSmallTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="wide310x150Logo" />
<uap:ShowOn Tile="square310x310Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
</uap:VisualElements>
<Extensions>
<uap3:Extension Category="windows.fileTypeAssociation">
<uap3:FileTypeAssociation Name="gfe">
<uap:SupportedFileTypes>
<uap:FileType>.gfe</uap:FileType>
</uap:SupportedFileTypes>
</uap3:FileTypeAssociation>
</uap3:Extension>
<uap3:Extension Category="windows.fileTypeAssociation">
<uap3:FileTypeAssociation Name="gfs">
<uap:SupportedFileTypes>
<uap:FileType>.gfs</uap:FileType>
</uap:SupportedFileTypes>
</uap3:FileTypeAssociation>
</uap3:Extension>
<uap3:Extension Category="windows.appExecutionAlias" Executable="Integrator.exe" EntryPoint="Windows.FullTrustApplication">
<uap3:AppExecutionAlias>
<desktop:ExecutionAlias Alias="Integrator5.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
</Application>
</Applications>
</Package>
これをありがとう。私が言いましたように、アプリはインストール/実行時に管理者権限なしで実行されますが、管理者が必要なブリッジで変換した後にのみ実行されます。 DACがこれを取り巻く何かを変える理由はありますか? – James
コードをデバッグして、仰角の要求を正確にトリガしている操作を確認しましたか?アプリ内でコードを変更する必要があるかもしれません。 –
@StefanWickMSFT、少なくとも私のアプリのユーザーが昇格された状態でそれを再起動するためのボタンがありますか? 私はしています var startInfo =新しいProcessStartInfo(Process.GetCurrentProcess()。MainModule.FileName){動詞= "runas"}; Process.Start(startInfo);デスクトップアプリケーションでは ですが、Desktop Bridgeでパッケージ化するとその呼び出しは失敗します。 – LOST