为什么我的Delphi 6程序在仅安装少量Windows 7系统(InnoSetup)时触发管理员权限请求? [英] Why is my Delphi 6 program triggering a request for admin rights upon install on only a minority of Windows 7 systems (InnoSetup)?

查看:311
本文介绍了为什么我的Delphi 6程序在仅安装少量Windows 7系统(InnoSetup)时触发管理员权限请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Delphi 6程序,大多数用户在没有管理员权限的用户帐户下运行时安装得很好。但是,在某些系统上,它会触发对管理员权限的请求。不幸的是我的不是其中之一,所以我很难诊断这个问题。我使用InnoSetup 5.1.9来构建我的安装程序。

I have a Delphi 6 program that for most users installs fine while running under a user account without admin privileges. However, on some systems it triggers a request for admin rights. Unfortunately mine isn't one of them so it's hard for me to diagnose this problem. I use InnoSetup 5.1.9 to build my install programs.

如何找出我需要改变的安装程序配置,以消除某些人的系统上管理员权限的需要?这对我的系统造成麻烦,因为在安装过程中,某些程序数据文件正被复制到管理员帐户的应用程序数据文件夹中。然后当我的程序在用户帐户下启动时,无法找到这些文件,因为它们不在用户帐户应用程序文件夹中。 / p>

How can I figure out what I need to change about my installation program's configuration to neutralize the need for admin rights on some people's systems? It's causing trouble for my system because during installation, certain program data files are being copied into the admin account's application data folder. Then when my program is launched under a user account, those files can not be found since they are not in the user account application folder, where they are expected to be.

推荐答案

这是由于默认情况 PrivilegesRequired 指令值,默认情况下配置为需要管理员抬高。如果你不需要这个,只需改变你的InnoSetup脚本,这个指令的值明确地是这样的:

This happens due to default PrivilegesRequired directive value, which is, by default configured to require administrator elevation. If you don't need this, simply change in your InnoSetup script, value of this directive explicitly to something like this:

[Script]
PrivilegesRequired=lowest

从引用:


特权优先设置为最低时,安装程​​序不会要求
运行管理权限,即使它由管理员组的
的成员开始。此外,卸载信息根密钥
始终为HKEY_CURRENT_USER,Shell
文件夹常量的常见形式映射到用户表单,即使
管理权限可用。

When PrivilegesRequired is set to lowest, Setup will not request to be run administrative privileges even if it was started by a member of the Administrators group. Additionally, the uninstall info root key will always be HKEY_CURRENT_USER, and the "common" forms of the Shell Folder constants are mapped to the "user" forms, even if administrative privileges are available.

这篇关于为什么我的Delphi 6程序在仅安装少量Windows 7系统(InnoSetup)时触发管理员权限请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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