开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜