Force an existing application to always run with UAC virtualization on

前端 未结 5 805
花落未央
花落未央 2020-12-18 01:13

I\'ve seen several questions that are the opposite of this; \"How do I disable virtualization?\" That is not my question. I want to force an application to run with virtuali

5条回答
  •  半阙折子戏
    2020-12-18 01:46

    I found one not very well cited condition where UAC Virtualization does NOT work: when the file in Program Files is maked as read-only.

    That is, suppose the file C:\Program Files\\config.ini is marked as read-only. When the application try to change it, UAC Virtualization will return an access denied error instead of reparsing it to %LOCALAPPDATA%\VirtualStore\\config.ini.

    Although I did not found this documented, this behavior is probably done by design, since it makes some sense.

    The solution is simple: assure that all files that are supposed to be modified by the application are not read-only (or just unflag all files, since the user will not be able to change them anyway).

提交回复
热议问题