“所请求的操作需要海拔"设置后的消息 [英] "The requested operation requires elevation" message after setup
问题描述
我在inno setup中为一个应用程序创建了安装程序,我试图在安装后运行该应用程序,但在Windows 7下却收到此消息:
I created setup program for one application in inno setup , where I'm trying to run application after install, but I get this message under Windows 7 :
请求的操作需要海拔.
我知道是因为有管理员权限.有什么方法可以解决此问题(除了以管理员身份运行setup.exe之外)?
I know it's because of admin privileges. Is there a way to overcome this (except of running the setup.exe as an administrator) ?
推荐答案
之所以发生这种情况,是因为该可执行文件被标记为需要提升.
This is occurring because the executable is marked as requiring elevation.
如果尝试使用postinstall
标志从[Run]
部分运行应用程序,则可以添加shellexec
标志.如果执行此操作,则Inno Setup
将使用ShellExecute
功能而不是CreateProcess
启动应用程序.这将使Windows启动UAC并在需要时以提升的特权运行应用程序.
If you try to run the application from the [Run]
section with the postinstall
flag, you can add the shellexec
flag. If you do that then Inno Setup
will start the application with the ShellExecute
function rather than CreateProcess
. This will make Windows bring up the UAC and run the application with elevated privileges if needed.
这篇关于“所请求的操作需要海拔"设置后的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!