WPF应用程序清单文件 [英] WPF application manifest file

查看:732
本文介绍了WPF应用程序清单文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我想使它能够作为被读了很多关于它的Adminstrator.I've始终启动WPF应用程序,它似乎,我要创造我自己的清单文件,并将其传递加时赛中的应用性能等运行时INT开始作为一个管理员。

I have a WPF application that I want to make it able to start always as an Adminstrator.I've been reading a lot about it and it seems that I have to create my own manifest file and pass it ot the Application properties so on runtime int starts as an Administrator.

应用程序本身加载的文件,有时文件可能需要管理员权限,以便它可以modified.That就是为什么我要找对于应用程序被安装后,能够始终得到在管理员模式下启动的方法。

The application itself loads a file and sometimes the file might demands administrator access so it can be modified.That is why I am looking for a way after the Application gets installed to be able always to get started in administrator mode.

推荐答案

要添加一个清单的点击右键的项目文件解决方案资源管理器

To add an Manifest click right on your project file on the Solution Explorer:


    <李>

    选择添加

新项目

选择应用程序清单文件

文件应该命名为 app.manifest 并没有将其重命名。

File should named app.manifest and didn't rename it.

您必须更改元素您的清单以始终启动作为管理员联系:

You have to change the element in your Manifest to start always as an Adminstrator:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />






BTW:好文章对这一问题。


BTW: Good Article to this Question

http://msdn.microsoft.com/en-美国/库/ ms742884.aspx

这篇关于WPF应用程序清单文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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