I am trying to setup an automated test framework using Raspberry with 10.0.10586.63. Here's a short list what steps it performs:
* Copy AppX to Raspberry. For ex.,
Copy RuntimeTests_1.0.0.0_ARM_Debug from C:\Tests\RuntimeTests_1.0.0.0_ARM_Debug.appx to \\minwinpc1\c$\Tests\RuntimeTests_1.0.0.0_ARM_Debug.appx
* Use powershell's Invoke-Command -ComputerName minwinpc1 -Credential <credentials> to execute commands remotely
- Get-AppxPackage Run* | Remove-AppxPackage (to ensure no previous packages are installed)
- Add-AppXPackage C:\Tests\RuntimeTests_1.0.0.0_ARM_Debug.appx to install new package
- Run the appx
My problem is with Get-AppxPackage Run* | Remove-AppxPackage, sometimes it fails with error
Code: Select all
Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CF1, Package was not found.
Windows cannot remove RuntimeTests_1.0.0.0_arm__pzq3xp76mxafg because the current user does not have that package
installed. Use Get-AppxPackage to see the list of packages installed.
NOTE: For additional information, look for [ActivityId] a5d4034b-5e95-0000-ed51-d4a5955ed101 in the Event Log or use
the command line Get-AppxLog -ActivityID a5d4034b-5e95-0000-ed51-d4a5955ed101
+ CategoryInfo : ObjectNotFound: (RuntimeTests_1.0.0.0_arm__pzq3xp76mxafg:String) [Remove-AppxPackage], P
SInvalidOperationException
+ FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand
I tracked this issue to different SID assigned to app when it's installed, for ex when executing Get-AppxPackage Run* -Allusers
Code: Select all
Name : RuntimeTests
Publisher : CN=DefaultCompany
Architecture : Arm
ResourceId :
Version : 1.0.0.0
PackageFullName : RuntimeTests_1.0.0.0_arm__pzq3xp76mxafg
InstallLocation : C:\Data\Programs\WindowsApps\RuntimeTests_1.0.0.0_arm__pzq3xp76mxafg
IsFramework : False
PackageFamilyName : RuntimeTests_pzq3xp76mxafg
PublisherId : pzq3xp76mxafg
PackageUserInformation : {S-1-5-21-2702878673-795188819-444038987-500 [S-1-5-21-2702878673-795188819-444038987-500]:
Installed}
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
I don't much about these security identifiers, but can I somehow ensure that it's always the same, or maybe there are some other control mechanisms for this?
Or is there a way to Remove-AppxPackage for all users.
Any help would be appreciated