问题描述
我正在努力在没有UAC弹出窗口的情况下加载我的应用程序.我的应用程序确实需要管理员权限,因为我要在本地以及2008服务器上的域中管理用户帐户.我的应用程序分为两个部分,一个服务和一个控制该服务的WPF应用程序.
我从Comodo购买了开发者证书,并且能够对应用程序进行签名.我也有一个分配给该项目的.manifest文件.
构建应用程序后,我看到了屏蔽,因此我知道它可以正常工作.但是,当我单击它时,会出现一个蓝色窗口,询问是否要允许以下程序对此计算机进行更改.
我相信我的问题围绕这条线:
I''m struggling to get my application to load without having a UAC popup window. My application does require admin access as I''m managing user accounts locally and with the domain on a 2008 server. My application is two parts, a service and a WPF app that controls the service.
I purchased a developer cert from Comodo and am able to sign the application. I also have a .manifest file assigned to the project.
After I build the application I see the shield on it so I know it''s working ok. However, when I click on it I get a blue window asking if I want to allow the following program to make changes to this computer.
I believe my issue is around this line:
<requestedexecutionlevel level="requireAdministrator" uiaccess="false" />
如果将级别设置为asInvoker,则不会出现UAC窗口,但由于需要操作,我的应用程序已关闭.
If I set the level to asInvoker the UAC window doesn''t appear but my app shuts down because of what it needs to operate.
Does anyone know how I can around this issue without disablign UAC?
推荐答案
这篇关于C#UAC麻烦-摆脱可怕的UAC窗口...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!