2 identical programs; Only 1 requests elevation

I have an interesting problem when compiling my programs on win32 (mingw). I have two identical projects created in C :: B. When compiling, it works fine, without requiring higher permissions, and the other asks the user for a dialog "Allow the program to make changes to the computer, etc.". I would like the application not to request the user, since it does not require elevated privileges.

This is under Win7 x64.

Could this be a Code :: Blocks problem or a compiler problem?

Thanks!

+6
source share
2 answers

It turns out that Win7 puts files with an β€œupdate” (case-insensitive) in the name, since it requires elevated permissions. So yes, you should know about the future

+2
source

As you have already discovered, Windows discovers certain application names, which, in its opinion, are the installers, and tries to help to pre-lift them to make sure they are successful.

However, this behavior is only allowed for executable files that do not have UAC information in the Win32 manifest. Therefore, if you have a program with one of the names affected, simply give it a manifest with the relevant UAC information and you will not receive unwanted prompts.

eg. Aaron blog http://brethorsting.com/blog/2007/02/meet_uac_-_creating_a_uac_manifest/

Martyn

+1
source

Source: https://habr.com/ru/post/892081/


All Articles