开发者

Running elevated applications on user login with UAC?

I need to start a program every time the user logs in, but I cannot do this without being met by a UAC dialog asking for permissions for that application. Is there any way to have an application start up on user login without the user having to answer the UAC prompt? I was thinking about running a service, but this would be a last resort. I saw something about an Application Compatibility Toolkit to disable UAC for certain applications, but I feel this is too big of a hassle -开发者_运维百科 even services would be easier to program. I was just wondering if there is an even easier solution I am missing. Thanks in advance.


No, there is not an easier answer. You should use a service in this situation. Not at all difficult.


Well, the answer here has been picked but there is another solution. You can add a manifest as an embedded resource and set the requestedExecutionLevel to asInvoker. This is assuming that your application is not doing anything that a low level user could not do with having to elevate privileges. It should also be noted that your code must be signed.

For more:

  • Create and Embed an Application Manifest with Your Application
  • CAS and How to properly elevate with Vista UAC
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜