How to run a Custom Action inside an MSI created in WiX with elevated privileges?

做~自己de王妃 提交于 2019-12-01 19:07:40

Make sure that:

  • it's scheduled after InstallInitialize
  • "Execute" attribute is set to deferred
  • "Impersonate" attribute is set to no

Please note that deferred custom actions cannot access the installation session, so you cannot access installer properties directly.

Your Custom Actions must be sequenced between InstallInitialize and InstallFinalize actions.

Do you get UAC prompt when you run the installer? If you perform a per-machine install, you would get UAC prompt when you click Install button in the wizard. If you don't get UAC prompt, then check ALLUSERS property is set to 2. See also Marking the Privileges for an MSI

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!