如何卸载其他用户安装的应用程序? [英] How to uninstall an app that another user installed?

查看:85
本文介绍了如何卸载其他用户安装的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试调试我的 Windows 8 应用程序时,我一直遇到这个问题,并且已经在另一个用户帐户上安装了一个副本:

I keep hitting this problem when I try to debug my Windows 8 apps and there is a copy already installed on another user account:

DEP0700:应用注册失败.另一个用户已经安装了此应用程序的打包版本.未打包的版本无法替代它.冲突的包是 {{{PackageName}}},它是由 CN={{{Certificate Stuff}}} 发布的.(0x80073cf9)

DEP0700 : Registration of the app failed. Another user has already installed a packaged version of this app. An unpackaged version cannot replace this. The conflicting package is {{{PackageName}}} and it was published by CN={{{Certificate Stuff}}}. (0x80073cf9)

有时我可以直接登录或请其他人登录机器并卸载应用程序.或者,我可以更改应用程序名称/ID,但一个并不总是可行的,另一个是有风险的(我不想将更改后的应用程序 ID 签入源代码管理).

Sometimes I can just log in or ask someone else to log in to the machine and uninstall the app. Alternatively I can change the application name/id, but one is not always possible and the other is risky (I don't want to check in the changed application id to source control).

一定有办法卸载它.也许是 PowerShell 脚本?

There must be some way to uninstall it. Maybe a PowerShell script?

推荐答案

我上面的过程仍然有效,但它只是解决了一个竞争条件问题,Windows Update(是的,很奇怪)负责清除staged包."

My process above still works, but it simply gets around a race condition issue, where Windows Update (yes, oddly enough) is in charge of wiping out "staged packages."

根据微软,其他修复" - 我仍然考虑这个问题是一个错误 - 是:

According to Microsoft, the "other fix" - and I still consider this issue to be a bug - is:

问题原因:

Windows Update (WU) 会下载您拥有的更新版本的软件包,并且阶段"它们作为本地系统,这样当你去商店时更新应用程序,更新过程尽可能快.吴将最终清理从未安装的暂存包.

Windows Update (WU) downloads newer versions of packages you have and "stages" them as Local System, so that when you go to the store to update the apps, the update process is as quick as possible. WU will eventually clean up the staged packages that were never installed.

使用暂存"包有什么后果?

  1. 暂存包阻止您在开发模式下安装该特定包

  1. Staged packages prevent you from installing that particular package in development mode

暂存包占用了一些磁盘空间,但由于硬链接,这种影响得到了缓解.如果一个文件在多个文件之间相同包的版本,appx 部署硬链接文件而不是维护同一文件的两个单独副本.

Staged packages eat up some disk space, but due to hardlinking, the effect of this is mitigated. If a file is identical between multiple versions of a package, appx deployment hardlinks the files instead of maintaining two separate copies of the same file.

如何找到暂存"包?

  1. 在管理员 powershell 提示符下,命令:

  1. In an administrator powershell prompt, the command:

get-appxpackage -all

将显示机器上的所有包.对于分阶段的包,PackageUserInformation 将显示 {S-1-5-18 [Unknown user]: Staged}2.使用powershell过滤,获取所有暂存包全名的列表,你可以这样做:

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

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

如何摆脱暂存"包?

  1. 从 sysinternals 工具下载 psexec,由 Mark Russinovich 编写

  1. Download psexec from sysinternals tools, written by Mark Russinovich

要摆脱所有这些,请在常规管理员/高级命令提示符(不是 powershell)中运行:

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

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

这篇关于如何卸载其他用户安装的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆