Inno setup-将应用安装到Program Files,不允许以管理员身份运行 [英] Inno setup - install app to Program Files, allow run not as admin

查看:428
本文介绍了Inno setup-将应用安装到Program Files,不允许以管理员身份运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的安装程序将应用程序安装到"Program files \ MyApp",该应用程序在此位置运行更改文件时.在Vista上,默认情况下会出现UAC问题.

My installer installs the app to "Program files\MyApp", the app when running changes files within this location. On Vista, by default this brings up UAC issues.

我希望用户每次运行应用程序时都能够运行MyApp,而不会被迷惑或与UAC屏幕发生冲突.如果他们必须通过UAC来安装应用程序,那虽然还不是最佳选择,但是可以.

I want users to be able to run MyApp without being admisn or fighting the UAC screen everytime they run the app. If they have to get through UAC to install the app, that's OK though still not optimal.

我以为我已经设置好了,但是没有用:

I thought I had this set up, but it's not working:

[Setup]
PrivilegesRequired=admin
AppName=My App
AppVerName=My App 1.0
DefaultDirName={pf}\MyApp
DefaultGroupName=MyApp
UninstallDisplayIcon={app}\bin\MyApp.ico
OutputDir=..\Installer
ChangesAssociations=yes

[Dirs]
Name: "{app}\"; Permissions: everyone-modify
Name: "{app}\redist"; Flags: deleteafterinstall;

特别是我认为Name: "{app}\"; Permissions: everyone-modify将允许普通用户运行它,从而删除了Program Files \ MyApp上的UAC保护.

Specifically I thought Name: "{app}\"; Permissions: everyone-modify would let normal users run it, removing UAC protection on Program Files\MyApp.

我随机选择一些值,有人可以建议一些更改吗?同样,其目的是,一旦安装,非管理员帐户的普通用户就可以运行它,即使文件已保存在Program Files中,也不会启动UAC.作为第二件事,安装本身不应该太疯狂……提示输入管理员密码或UAC授权.

I am picking at values a bit by random, can anyone suggest some changes? Again, the aim is that once installed, normal users in non-admin accounts can run it even though files are saved in Program Files, without UAC kicking in. As a secondary thing, the installation itself should not be too crazy... a single prompt for admin password or UAC authorization.

推荐答案

不要在{pf}下安装.而是安装到用户可写的位置(例如{localappdata}).
http://www.kinook.com/blog/?p=53

Don't install under {pf}. Instead, install to a user-writeable location (for instance, {localappdata}).
http://www.kinook.com/blog/?p=53

这篇关于Inno setup-将应用安装到Program Files,不允许以管理员身份运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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