tags:

views:

248

answers:

2

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.

+1  A: 

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

Tom Cabanski
Fully agree, if there was an easy answer, every program would use it and bypass UAC.
Timores
+1  A: 

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:

Thomas
Good point. We don't know why the app is elevating. If it's accidental, a manifest requesting "asInvoker" would put a stop to it. If it needs to elevate I agree a service is the way to go, assuming it doesn't communicate with the logged-in user.
Kate Gregory