WIX自定义安装程序管理员权限 [英] WIX custom installer admin privilege

查看:241
本文介绍了WIX自定义安装程序管理员权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用C#WPF开发了WIX定制安装程序.我需要使用c#从"c:\ Program Files"中删除文件.显示未经授权的错误.如果我以以管理员身份运行"手动运行,则可以运行.我尝试添加清单文件和必要的更改.但这没有用.我尝试将相同的清单文件复制到控制台应用程序,并且可以正常工作.

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.

推荐答案

您可以通过创建一个C#自定义操作项目并将其在WIX项目中引用来实现.

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

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆