WIX custom installer admin privilege

痴心易碎 提交于 2019-12-08 06:45:20

问题


I have developed a WIX custom installer using C# WPF. I need to delete a file from "c:\Program Files" using c#. It shows error unauthorised. If i manually run with "run as administrator" it works. I tried adding manifest file and necessary changes. But it didn't work. I tried copying the same manifest file to a console application and it works.


回答1:


You can do this by creating a C# custom action project and referring it in the WIX project.

https://blogs.msdn.microsoft.com/jschaffe/2012/10/23/creating-wix-custom-actions-in-c-and-passing-parameters/



来源:https://stackoverflow.com/questions/46704056/wix-custom-installer-admin-privilege

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