Still have no answer to why a program that messes with the registry can get by UAC detection.
Because messing with the registry has nothing to do with UAC, and there is nothing like "UAC
detection". It simply don't works like that.
UAC only prompts for elevation when something
explicitly request elevation. It does
NOT interferes with program execution and does
NOT tries to guess what "changes" a program is doing. Contrary to what the Windows help texts says, UAC has really nothing to do with changes in the computer, and UAC will not notify when something tries to do changes in global areas. I suppose that those completely misleading texts are there for non-tech people, but you, as a programmer, must use the proper documentation to know how UAC really works and how to use it effectively.
The bunch of links that
andrew129260 posted are quite good and accurate, they'll help you in understanding how to solve the problem.
To give a quick and dirty resume on what does trigger UAC prompt, from memory, I know those:
- A process is explicitly started "as administrator" by the calling process. The "Run as Administrator" in Windows Explorer context menu does this, allowing any program to be elevated
- The executable you're launching is manifested as "RequireAdministrator" in its security settings, in which case Windows will always try to elevate, regardless of the calling program asking for it or not. If your configurator program requires to be always elevated, this is what you must do (and why I asked previously, but it's quite evident by now that you haven't done so).
- If the executable compatibility settings say so, it will also prompt for elevation on each execution, something like the first case but automatically
- If Windows is configured to autodetect "installations" (by default it does so), any executable named like "setup", "install" and a few others I don't remember will also be elevated regardless of anyone explicitly asking for it. This is your case and why you saw that prompt. You should also never rely on it, as it's a backward compatibility feature (to allow older installers to elevate without knowing about UAC).
It's also worth noting that UAC elevation takes place
only when the process is being created, and then never more, so that a program cannot be changed to run as admin if it didn't started as it from the beginning. Programs that need to elevate in the middle of an operation need to launch a second, elevated, process to do all the admin-only work.