Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"The requested operation requires elevation" message after setup

Tags:

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 :

The requested operation requires elevation.

I know it's because of admin privileges. Is there a way to overcome this (except of running the setup.exe as an administrator) ?

like image 419
chubbyk Avatar asked Nov 15 '10 21:11

chubbyk


People also ask

How do you fix the required operation requires elevation?

1) Right-click the file on the external hard drive, then select Properties. 2) Go to the Compatibility tab and check Run this program as an administrator. 3) Save the changes by clicking Apply > OK.

What is elevation on computer?

The term “elevation” simply means that you need a “higher” level of access to the system than you currently have. The privileges associated with your current login need to be temporarily raised or “elevated” to a more privileged or powerful level.

How do I get elevation in CMD?

In the search results window, under Programs, right-click on the program cmd.exe. In the pop-up menu, select Run As Administrator. If a User Access Control window appears, log in with a Windows user account that has full Administrator access rights. An Elevated Command Prompt window should now open.


2 Answers

This is occurring because the executable is marked as requiring elevation.

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.

like image 119
Martin Dimitrov Avatar answered Oct 12 '22 05:10

Martin Dimitrov


No, there's no way to overcome this, short of elevating yourself to administrator.

The reason this is the case is to prevent unauthorized actions from taking place on your computer. Mostly, it allows companies to set policies on what users can and cannot do with their computers.

like image 22
Robert Harvey Avatar answered Oct 12 '22 05:10

Robert Harvey