469,898 Members | 1,417 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Installing service programatically on Vista not working if UAC enabled?

Hi all.

I have a Winforms app that installs a service programatically (as opposed to
using InstallUtil).

If UAC on Vista is disabled, it works fine. Likewise, if the program is
started by right-clicking and picking "Run as Administrator" it works (if
UAC is enabled), but neither option is ideal. I suppose really I want UAC to
pop up it's "do you want to allow this to happen" box when my code does its
thing. Can anyone point me in the direction of how to achieve this?

Thanks!
Feb 15 '08 #1
2 1880
You can add a manifest that makes your app run with Administrator permissions
using the "mt" utility. Willy DeNoyette describes here:
http://groups.google.com/group/micro...71bf72d0ad75a6

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"JamesB" wrote:
Hi all.

I have a Winforms app that installs a service programatically (as opposed to
using InstallUtil).

If UAC on Vista is disabled, it works fine. Likewise, if the program is
started by right-clicking and picking "Run as Administrator" it works (if
UAC is enabled), but neither option is ideal. I suppose really I want UAC to
pop up it's "do you want to allow this to happen" box when my code does its
thing. Can anyone point me in the direction of how to achieve this?

Thanks!
Feb 15 '08 #2

"Peter Bromberg [C# MVP]" <pb*******@yahoo.NoSpamMaam.comwrote in message
news:AB**********************************@microsof t.com...
You can add a manifest that makes your app run with Administrator
permissions
using the "mt" utility. Willy DeNoyette describes here:
http://groups.google.com/group/micro...71bf72d0ad75a6
Thanks for the reply - i'll give it a try!

Feb 17 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

33 posts views Thread by JamesB | last post: by
5 posts views Thread by eliasen | last post: by
1 post views Thread by svandanapu | last post: by
2 posts views Thread by =?Utf-8?B?TUNN?= | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.