How does Windows decide whether to display the UAC prompt?

前端 未结 4 1630
旧巷少年郎
旧巷少年郎 2020-12-08 10:53

In my VB6 application I open other EXE files. My application runs without any UAC prompt, but I have an EXE which checks for updates to software. This prompts the UAC prompt

相关标签:
4条回答
  • 2020-12-08 11:27

    Someone can specify in the configuration of the exe that this file needs to be executed with higher Privileges.

    How to request Admin Privileges

    I don't know what this update is for, but I'd suggest that it needs to update a component like a service, or some files that are located in the ProgramFiles-Dir. Therefore it needs Admin Privileges.

    0 讨论(0)
  • 2020-12-08 11:31

    You are almost certainly hitting a Windows Installer Detection Technology

    0 讨论(0)
  • 2020-12-08 11:31

    Your programs probably lack application manifests that mark them as non-legacy. As a result Windows will apply scripted installer detection heuristics to decide whether your program is an installer. This is pretty much the only way an "unexpected" UAC prompt gets raised.

    These heuristics include keyword searches within the EXE file name and several of the extended properties of the EXE, and may even look for well-known binary signatures (i.e. byte strings) inside the file.

    BTW, your crypto-signing doesn't enter into this at all. And it doesn't help a thing if it wasn't issued by a trusted CA.

    For that matter anyone who trusts code just because Windows reports the commpany name on the UAC prompt is a fool. Malware authors steal these all the time, and for that matter they are trivial to obtain and almost never reported by users when crap programs cause problems. Save your money, code signing certs are a failed concept.

    0 讨论(0)
  • 2020-12-08 11:32

    The UAC prompt is used when a privilege elevation is needed. Your own VB6 app doesn't need it, and therefore the default behavior is OK. An updater would need the privilege, so its author marked the executable as requiring it. Windows spots that and puts up the UAC prompt.

    Now depending on the exact Windows version and security updates, that privilege remains available for a while, even to other (child) processes. This may prevent duplicate UAC prompts.

    0 讨论(0)
提交回复
热议问题