“所请求的操作需要海拔"设置后的消息 [英] "The requested operation requires elevation" message after setup

查看:82
本文介绍了“所请求的操作需要海拔"设置后的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在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屋!

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