Windows Inno安装程序生成的安装程序需要仰角。我如何避免这种情况?

Windows Inno安装程序生成的安装程序需要仰角。我如何避免这种情况?,windows,windows-10,inno-setup,Windows,Windows 10,Inno Setup,我有一个Inno安装脚本,只需将文件安装到用户的本地程序文件目录:C:\Users{account}\AppData\local\Programs\MyAppName 当我运行安装程序exe时,它不应该触发提升,但它确实触发了 [Setup] AppName=MyAppManager AppVerName=MyAppManager AppCopyright=Copyright (C) 2018 Frank Rizzo AppPublisher=Frank Rizzo DefaultDirName

我有一个Inno安装脚本,只需将文件安装到用户的本地程序文件目录:C:\Users{account}\AppData\local\Programs\MyAppName

当我运行安装程序exe时,它不应该触发提升,但它确实触发了

[Setup]
AppName=MyAppManager
AppVerName=MyAppManager
AppCopyright=Copyright (C) 2018 Frank Rizzo
AppPublisher=Frank Rizzo
DefaultDirName={userpf}\MyAppManager
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyPage=yes
;UninstallDisplayIcon={app}\MyAppManager.exe
OutputBaseFilename=MyAppManagerSetup
AppID=MyAppManager.1
VersionInfoVersion=0.4

[Files]
Source: "..\bin\debug\MyAppManager.exe"; DestDir: "{app}"
Source: "CleanFiles\MyAppManager.exe.config"; DestDir: "{app}"
Source: "..\bin\debug\ScintillaNET.dll"; DestDir: "{app}"
Source: "..\bin\debug\Elasticsearch.Net.dll"; DestDir: "{app}"
Source: "..\bin\debug\Nest.dll"; DestDir: "{app}"

我需要做什么来避免提升?

默认情况下,基于Inno安装程序的安装程序不包含有关其所需权限的信息。这使得Windows能够进行自动检测。例如,如果.exe名称包含诸如
Setup
之类的关键字,则会使Windows请求提升。尽管即使删除这些关键字也可能没有帮助,因为安装程序仍然可以触发其他规则

要覆盖自动检测,请使用。特别是,将其设置为
最低值

[Setup]
PrivilegesRequired=lowest

有关Windows 10需要管理员权限才能卸载的问题,请参阅:

首先从安装程序名称中删除setup或install字样。如果Windows认为该程序是一个安装程序,并专门键入这些名称,它将自动强制提升。从技术上讲,任何安装任何东西的应用程序都应该需要提升,而您试图在没有提升的情况下这样做违反了Windows准则。您还将遇到大多数AV软件和公司集团策略设置的问题。