'Apps &Windows 10 中的“功能"启动提升的单用户卸载程序 [英] Workaround for 'Apps & features' in Windows 10 starting a single-user uninstaller elevated

查看:22
本文介绍了'Apps &Windows 10 中的“功能"启动提升的单用户卸载程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户尝试使用 添加/删除程序"卸载他们自己的单用户安装(例如使用 lowestprivileges noneHKCU 条目 安装)时em> 在控制面板中,一切正常(即非管理员用户可以卸载自己的非管理员安装).

When users try to uninstall their own single user installation (for example installed using lowestprivileges none and HKCU entries) with 'Add/Remove Programs' in the Control Panel, everything works fine (that is, non-admin users can uninstall their own non-admin installation).

但是,当用户从 'Apps &功能"(Windows 10).

However the uninstaller will be elevated, when users start it from 'Apps & features' (Windows 10).

这似乎是一个已知的 Windows 10 错误:
如何防止标准 Windows 10 用户的卸载程序提升?

This seems to be a known Windows 10 bug:
How to prevent uninstaller elevating for Standard Windows 10 user?

当 Inno Setup 卸载程序从 'Apps &特征'?链接此 NSIS Windows 卸载程序提升错误的解决方法.

Is there a way to work-around this issue when the Inno Setup uninstaller is started from 'Apps & features'? Link this NSIS Workaround for Windows uninstaller elevation bug.

推荐答案

你必须做的正是 NSIS hack 确实如此.

You will have to do exactly what that NSIS hack does.

  1. 找出什么是 Windows GUI 用户(并假设您应该以该用户身份卸载).或者,您可以将用户名存储到安装文件夹中的某个文件中.

  1. Find out what is the Windows GUI user (and assume that you should uninstall as that user). Alternatively, you can store the username into some file in the installation folder.

以该用户身份重新执行安装程序.该 hack 使用 StdUtils NSIS 插件 及其 ExecShellAsUser 功能.也许可以从 Inno Setup 使用 DLL.如果没有,你至少可以重用它的代码.

Re-execute the installer as that user. That hack uses StdUtils NSIS plug-in with its ExecShellAsUser function. Maybe the DLL can be used from Inno Setup. If not, you can at least reuse its code.

所有这些在一个问题中都可以提出很多问题.如果您有具体问题,请考虑提出更具体的问题.

All this is imo to much to ask in a single question. If you have specific problems, consider asking more specific questions.

更简单的替代方法是阻止卸载,当以不同的用户身份执行时,并向用户显示转至控制面板的建议.

Simpler alternative would be to prevent the uninstallation, when executed as different user, and show a suggestion to the user to go to Control panel instead.

有关类似问题,请参阅标准 Windows 用户的卸载程序问题.

For a similar question, see Uninstaller trouble with standard Windows user.

这篇关于'Apps &Windows 10 中的“功能"启动提升的单用户卸载程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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