Run as administrator: requireAdministrator & ClickOnce + emulating system time

后端 未结 6 1746
暗喜
暗喜 2020-12-18 21:33

My app uses ClickOnce tehcnology. Today I needed to run it as administrator. I modified the manifest file from



        
6条回答
  •  难免孤独
    2020-12-18 22:10

    Time is a system-wide thing, you can't change it just for your process. The only way to lie about it to your dependencies is to hook the API, using Detours or something similar. Not allowed if you're a lowly user account.

    Modifying the time requires the "Change the system time" and/or "Change the time zone" privileges (which the Administrator account is normally given).

    And as mentioned by @Chris, admin and ClickOnce aren't compatible.

提交回复
热议问题