0

For background, I have installed the app using Add-AppxProvisionedPackage, because I had the preinstall version of that. But now, I don't need that to be installed anymore.

I am trying to install new version of my appx manually using Add-AppxPackage, but it failed that I have the same app installed to another user although I already uninstalled the app from the settings for current user

I found out that the appx is still installed to S-1-5-18 user, from Get-AppxPackage -allusers

Name                   : XXXX
Publisher              : CN=XXXXXXX
Architecture           : X86
ResourceId             : 
Version                : X.X.X.X
PackageFullName        : XXXXXXX_X.X.X.X_x86__XXXXXXXXXXXX
InstallLocation        : C:\Program Files\WindowsApps\XXXXXXX_X.X.X.X_x86__XXXXXXXXXXXX
IsFramework            : False
PackageFamilyName      : XXXXXXXXXXXXXXX_XXXXXXXXXX
PublisherId            : XXXXXXXXXX
PackageUserInformation : {S-1-5-18 [S-1-5-18]: Staged}
IsResourcePackage      : False
IsBundle               : False
IsDevelopmentMode      : False

I tried

Remove-AppxProvisionedPackage -PackageName <packagename>
Remove-ProvisionedAppxPackage -PackageName <packagename>
Remove-AppxPackage -PackageName <packagename>

and none of them worked. Error varies from:

  • parameter not correct
  • unable to resolve package name (I tried both name and full package name)
  • invalid parameter
  • Error, unable to continue. Make sure that the image is installed with DISM, and redo

How can I remove the appx that is installed to S-1-5-18 ?

kurakura88
  • 2,185
  • 2
  • 12
  • 18
  • I found a reference: http://stackoverflow.com/questions/13865930/how-to-uninstall-an-app-that-another-user-installed – kurakura88 Mar 07 '17 at 03:28
  • S-1-5-18 is the LocalSystem (SYSTEM) account so the reference answer of using `psexec -s` to run powershell looks relevant. – henrycarteruk Mar 07 '17 at 11:41
  • 1
    I tried both `psexec -s powershell -c "get-appxpackage | remove-appxpackage"` and `psexec -s powershell -c "Get-AppxPackage -all | where name -eq "APP.NAME" | Remove-AppxPackage"`. It exited successfully, but the app is still there (which means it doesn't work). For additional info, I am using Windows 10 Anniv. Ed. – kurakura88 Mar 08 '17 at 04:37

0 Answers0