How to remove an application installed by another user?

I continue to encounter this problem when I try to debug my applications for Windows 8, and there is a copy already installed in another user account:

DEP0700: Application registration failed. Another user has already installed the batch version of this application. The unpacked version cannot replace this. The conflicting package is {{{PackageName}}} and published by CN = {{{Certificate Stuff}}}. (0x80073cf9)

Sometimes I can just log in or ask someone else to log in and uninstall the application. Alternatively, I can change the name / id of the application, but one of them is not always possible, and the other is risky (I do not want to check the changed application identifier for the original control).

There must be some way to remove it. Perhaps a PowerShell script?

+58
powershell windows-8 windows-store-apps windows-store windows-runtime
Dec 13 '12 at 18:15
source share
10 answers

My process above still works, but it just bypasses the race condition problem where Windows Update (yes, oddly enough) is responsible for destroying the “delivered packages”.

According to Microsoft , the “other fix” - and I still consider this problem to be an error - is:

The cause of the problem:

Windows Update (WU) downloads the newer versions of the packages that you have and puts them as a local system, so when you go to the store to update applications, the update process will be as fast as possible. WU will eventually flush out phased packages that have never been installed.

What are some of the consequences of having "Staged" packages?

  • Floor packages do not allow you to install this package in development mode

  • Floor packages eat up some disk space, but due to tight bindings, the effect is softened. If the file is identical between several versions of the package, the appx application creates hard links to the files instead of supporting two separate copies of the same file.

How to find "Staged" packages?

  • At the powershell admin prompt, enter the command:

    get-appxpackage -all

will display all packages on the machine. For a phased package, PackageUserInformation will show {S-1-5-18 [Unknown user]: Staged} 2. Using powershell filtering to get a list of all phased package names, you can do:

  get-appxpackage -all |% {if ($_.packageuserinformation.installstate -eq "Staged"){$_.packagefullname}} 

How to get rid of "Staged" packages?

  • Download psexec from psexec tools written by Mark Russinovich

  • To get rid of all of them, run admin / elevated (not powershell) at a command prompt:

psexec -s powershell -c "get-appxpackage | remove-appxpackage"

+24
Jan 18 '13 at 20:15
source share

If that doesn't work, you can also try the following, which worked for me. Note that this is for my dev machine and not for a regular user computer, so I don't know how this will affect non-devs: -P

  • Compliance with folders c: \ Program Files \ WindowsApps and C: \ ProgramData \ Microsoft \ Windows \ AppRepository - providing full administrator access. Ensure that TrustedInstaller also has edit rights. You also rule. If you do not know, this is done using the properties in this folder.

  • Go to the Services section and stop the Windows Installer service.

  • Open C: \ ProgramData \ Microsoft \ Windows \ AppRepository \ and delete the PackageRepository.edb file.

  • Run the Windows Installer service again.

  • Launch Visual Studio as an administrator.

  • Try to run the application. It should work.

After starting the application, when you can start VS again in user mode.

+21
Jan 15 '13 at 14:39
source share

Bypass

If nothing works for you (it didn't work for me either), you can just change the package name in the application manifest (just replace the last few characters with other characters). When you do this, you will no longer have conflicting packages.

Changing the package name may not be acceptable for some scenarios, but you can always back up and change it when you finish debugging on your problem device ....

+19
Jun 14 '13 at 10:35
source share

If you want to remove the application for the current user, try:

Get-AppxPackage | where name -eq "APP.NAME" | Remove-AppxPackage

They helped me. So Get-AppxPackage without -all.

+12
Sep 06 '14 at 10:55 on
source share

In windows 10:

First you need an SQL database editor such as SqliteBrowser3

  • Do this manipulation as a system user (use psexec or else)
  • Make a copy of C:\ProgramData\Microsoft\Windows\AppRepository\StateRepository-Machine.srd
  • Open this copy with SqliteBrowser3
  • You will need to edit the table "package", "packageuser" and "user". To do this, you will need to specify the ghost user ID from the "user" table, and then delete them. Then delete the entries with the ghost user ID in the user column from the "packageuser" table.
  • kill tasklist /svc /fi "services eq StateRepository"
  • replace the original StateRepository-Machine.srd after the backup.
  • reboot and then you can remove your package normally

Note: you need to leave your own custom record assigned to the package.

+8
Nov 09 '15 at 7:25
source share

There is a set of PowerShell cmdlets for managing Windows Store applications. You can specify installed applications on the computer for all users, if as an administrator you run the following command:

 Get-AppxPackage -AllUsers 

I have not yet found a way to uninstall the application for another user. Remove-AppxPackage only works for the current user. This makes it all the more interesting if you delete a user with installed applications. At least in pre-release versions of Windows 8, this made it impossible to uninstall the application that he installed. I managed to successfully avoid this situation after the final version, so I can’t confirm that the problem is still present, i.e. Applications are not deleted when a user account is deleted.

+5
Dec 15
source share

Although this did not work for me, it can only work for someone else ...

Run powershell as an administrator and run:

 Get-AppxPackage -all | Out-GridView -Passthru | Remove-AppXPackage 

Then SELECT the correct package and OK , hopefully it will delete.

+3
Nov 01 '17 at 7:02
source share

What worked for me

  1. Close VS 2. Open Services 3. Stop Appx Deployment Service 4. Open C:\ProgramData\Microsoft\Windows\AppRepository\ and delete the PackageRepository.edb file. 5. Start Appx Deployment Service 6. Start VS & Debug - worked like charm 
+2
Apr 29 '15 at 6:44
source share

This is similar to some other answers, especially @Pavel Nazarov's, but works for different users. And this is different from the accepted answer, because you do not need to install any programs.

In Windows Powershell in administrator mode, run:

get-appxpackage -all | where name -eq "{{ App Name }}" | remove-appxpackage

+2
Nov 30 '16 at 16:42
source share

If everything else fails and you are desperate, as in my case (because the user has been deleted) This is a little dangerous, but it worked for me.

MAKE YOUR OWN RISK! I knew that my user was the last user created on the machine.

This answer is a combination of Auri Rahimzadeh's answer above to TAKEOWN and intika's answer, where you change StateRepository-Machine.srd using "DB Browser for SQLite" (downloaded here: DB Browser for SQLite 3 ), the only difference is I only edited one thing : In PackageUser, I changed the value of User 3 (which was the identifier of the previous remote user) to 4 (which is me, the last user created)

MAKE SURE TO CHECK THE USER TABLE AND SEE THE VALUES WORK IN YOUR CASE!

0
Nov 07 '17 at 8:59
source share



All Articles