What are the differences between “Run as administrator” and a manifest with requireAdministrator?

前端 未结 4 1036
谎友^
谎友^ 2021-01-06 17:02

I\'ve written a program with a manifest that includes requireAdministrator. On Windows 7 systems with UAC enabled, Windows pops up a dialog asking for permissions, as it sh

4条回答
  •  北海茫月
    2021-01-06 17:28

    I thought I was seeing a difference between these as well. However, it turned out that in my case the issue was this:

    When I click "Run as Administrator" from my file browser (Q-Dir), the working directory is different than when I try simply double clicking an application with requireAdministrator set in the manifest. This changed the behavior of some buggy DLLs I had received. In fact, it turned out that 100% of the differences I saw were due to running from different working directories (specifically, it mattered whether I was on C: drive or a different drive letter) and that the method of getting the program to run as administrator had nothing to do with it.

    It's an issue that is specific to my computer's exact configuration, but it is a possible clue into the type of thing that might be happening (or might have happened 7 years ago . . . )

提交回复
热议问题