开发者

How to Disable UAC for my application

Well , when ever I am trying to run my application as administrator I am getting the following error, and whether to allow or not.

If I am running the app directly and not as an administrator then this seems to work. Is there Some thing I need to do to开发者_Python百科 get rid of the UAC , no I dont want user to manually change the UAC settings.

Do I need to tweak registry settings only for my programe or any certificate I need to sign with.

How to Disable UAC for my application


In general, you can't disable UAC. The goal of UAC is to provide a defense in depth against malware. It would be counterproductive if an Tojan could just disable UAC.

What you can do is accept that UAC exists, and roll with it. You shouldn't usually run as Administrator, so it's perfectly fine to get a UAC dialog when you do. For instance, Auto Start can be handled as a per-user setting, which means you don't need to be an admin to change that.


As a workaround on your machine, you can create a scheduled task that launches your application and tick the "run with highest privileges" in the general settings. Then you create a link to the sheduled task with schtasks /run /tn "TASKNAMEINQUOTES" as the link text. This will call the task that will run the application with elvated privileges without the UAC prompt. More on this here: http://www.howtogeek.com/howto/windows-vista/create-administrator-mode-shortcuts-without-uac-prompts-in-windows-vista/


In

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

there is such item as ConsentPromptBehaviorAdmin. Change it.


Configure an application to always run elevated: http://technet.microsoft.com/en-us/library/cc709691(WS.10).aspx#BKMK_S2


I had a program (Notepad2)suddenly require admin rights on a win-7 system. Seems that this can be changed easily.

Right-click the applicaiton, select properties, go to the compatibility tab, at the bottom is

Privilege level: Run this program as an administrator.

Unclick it and OK your way out. Worked for me.


Your process needs to elevate its privileges. There are couple of articles about this in CodeProject but have a look at this one first.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜