简体   繁体   中英

Is it a Microsoft issue?

I have a exe was complied by VC6 and the file name is patch.exe, there is no manifest was added, in that case, the EXE file requires administrator privileges, even though I removed all codes, just keep a empty main(), the result is same. But if I change the EXE from patch.exe to a.exe, the issue is gone.

Below is my test result. 1. EXE was complied by VC6 2. Without manifest or didn't specific privileges in manifest 3. the exe name included "patch" substring, case-insensitive

Is it a Microsoft issue? Why?

Tried VC2008, I can't repeat it.

The UAC feature of Vista, etc. does use the filename of the executable to guess whether it's going to need escalated Admin privileges. So "legacy" installation programs such as setup.exe, install.exe, patch.exe (and others too I guess) which won't include a manifest will get appropriate privileges even if users don't do "Run as Administrator..." for it.

As to why the VC2008 version doesn't cause an escalation request? I don't know. Maybe there's a manifest embedded into it somewhere that is explicitly or implicitly saying it doesn't need it.

A question along these lines has already been asked on StackOverflow.

How to prevent Vista from requiring elevation on patch.exe?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM