从程序和功能卸载没有足够的权限

时间:2023-02-01 22:39:39

Win 10. Installer for application created with Installshield PE 2015.

Win 10.使用Installshield PE 2015创建的应用程序的安装程序。

When I call uninstall by link at Start menu or from Programs and Features control panel started uninstallation. Unistall call custom script and call some application by cmd call with lower permissions then expected.

当我通过开始菜单中的链接调用卸载或从程序和功能控制面板启动卸载时调用卸载。 Unistall调用自定义脚本并通过cmd调用调用某些应用程序,然后使用较低的权限。

Process explorer shows: started msiexec.exe with full permissions and it is call msiexec.exe with lower permitions, that's not enough for called by csutom action applications.

进程资源管理器显示:启动具有完全权限的msiexec.exe,并且调用具有较低权限的msiexec.exe,这对于csutom操作应用程序调用是不够的。

If uninstaller link run as Administrator from start menu - permissions enough.

如果卸载程序链接从开始菜单以管理员身份运行 - 权限就足够了。

question: Is this a new bug or feature? What is the meaning of the restriction of rights if uninstallation is already called with maximum permissions on behalf of the administrator?

问题:这是一个新的错误或功能吗?如果已经代表管理员以最大权限调用卸载,那么权限限制的含义是什么?

note: application run during uninstallation is strongly requirement for my uninstallation, and for Installshield and uninstaller it is normal to call some custom scripts for this.

注意:卸载期间运行的应用程序是我卸载的强烈要求,对于Installshield和卸载程序,为此调用一些自定义脚本是正常的。

1 个解决方案

#1


0  

This typically indicates you have a bug in your custom action's definition. If it needs elevated permissions, it needs to be scheduled as Deferred in System Context, Commit in System Context, or Rollback in System Context. If you did not do this, and instead relied on the launcher elevating the initial installation context, it can lead to problems like you describe. Try to fix this first by not elevating at the launcher (to reveal the partially latent problems) and then fixing your custom action scheduling.

这通常表示您的自定义操作定义中存在错误。如果需要提升权限,则需要将其调度为“系统上下文中的延迟”,“系统上下文中的提交”或“系统上下文中的回滚”。如果你没有这样做,而是依赖于启动器提升初始安装上下文,它可能会导致像你描述的问题。尝试通过不在启动器处升高(以显示部分潜在问题)然后修复自定义操作计划来解决此问题。

Occasionally (and I do mean rarely) there is no great alternative to elevating in the launcher. For that case, you may wish to suppress the normal entry in Programs and Features, and create your own that runs an elevating launcher. You may need to manually cache such a launcher on the system, however, as it sounds like you are using a Basic MSI project, and that will cache only the .msi file.

偶尔(我的意思很少)没有很好的选择来提升发射器。对于这种情况,您可能希望禁止“程序和功能”中的正常条目,并创建自己的运行升降启动器。您可能需要在系统上手动缓存此类启动器,因为它听起来像您正在使用基本MSI项目,并且只会缓存.msi文件。

#1


0  

This typically indicates you have a bug in your custom action's definition. If it needs elevated permissions, it needs to be scheduled as Deferred in System Context, Commit in System Context, or Rollback in System Context. If you did not do this, and instead relied on the launcher elevating the initial installation context, it can lead to problems like you describe. Try to fix this first by not elevating at the launcher (to reveal the partially latent problems) and then fixing your custom action scheduling.

这通常表示您的自定义操作定义中存在错误。如果需要提升权限,则需要将其调度为“系统上下文中的延迟”,“系统上下文中的提交”或“系统上下文中的回滚”。如果你没有这样做,而是依赖于启动器提升初始安装上下文,它可能会导致像你描述的问题。尝试通过不在启动器处升高(以显示部分潜在问题)然后修复自定义操作计划来解决此问题。

Occasionally (and I do mean rarely) there is no great alternative to elevating in the launcher. For that case, you may wish to suppress the normal entry in Programs and Features, and create your own that runs an elevating launcher. You may need to manually cache such a launcher on the system, however, as it sounds like you are using a Basic MSI project, and that will cache only the .msi file.

偶尔(我的意思很少)没有很好的选择来提升发射器。对于这种情况,您可能希望禁止“程序和功能”中的正常条目,并创建自己的运行升降启动器。您可能需要在系统上手动缓存此类启动器,因为它听起来像您正在使用基本MSI项目,并且只会缓存.msi文件。