在 PowerShell 中,如果我运行 获取-AppxPackage , 我得到了安装的 UWP 应用程序列表,包括我的。
例如:
Name : TonyHenrique.tonyuwpteste
Publisher : CN=tTony
Architecture : X64
ResourceId :
Version : 1.1.12.0
PackageFullName : TonyHenrique.tonyuwpteste_1.1.12.0_x64__h3h3tmhvy8gfc
InstallLocation : C:\Program Files\WindowsApps\TonyHenrique.tonyuwpteste_1.1.12.0_x64__h3h3tmhvy8gfc
IsFramework : False
PackageFamilyName : TonyHenrique.tonyuwpteste_h3h3tmhvy8gfc
PublisherId : h3h3tmhvy8gfc
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
Dependencies : {Microsoft.NET.CoreRuntime.2.1_2.1.25801.2_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.Debug_14.0.25805.1_x64__8wekyb3d8bbwe,
TonyHenrique.tonyuwpteste_1.1.12.0_neutral_split.scale-100_h3h3tmhvy8gfc}
IsPartiallyStaged : False
SignatureKind : Developer
Status : Ok
现在我想启动这个应用程序。
如何在 中执行此操作PowerShell ,或在 cmd ?
最佳答案
在开发过程中,我遇到过应用系列名称偶尔会更改的情况。您可以通过简单的查找按名称可靠地启动应用程序:
powershell.exe explorer.exe shell:AppsFolder\$(get-appxpackage -name YourAppName ^| select -expandproperty PackageFamilyName)!App
explorer.exe shell:AppsFolder\$(get-appxpackage -name YourAppName | select -expandproperty PackageFamilyName)!App
关于powershell - 如何在 Windows 10 中从 PowerShell 启动通用 Windows 应用程序 (UWP)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46893260/