Search code examples
qtqt-creatorprivileges

Qt: Cannot execute '': The requested operation requires elevation


I am not able to run the application the Qt creator. It complains the following error:

Cannot execute '': The requested operation requires elevation

My .exe file has a Windows administrator shield symbol on it. Do I need to make a project settings changes? I am extensively using Qt File library for doing some file operations.


Solution

  • What's your executable's file name? Without an embedded manifest, windows tries to be smart and wants to run executables with "install", "update", "setup", "patch", etc. in the file name as administrator. It even checks for those names within words such as "autoupdate".

    The problem is that qmake/mingw doesn't embed those manifests, while MSVC does. If someone has a clean solution to that problem, I'd be interested to learn about it.