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!
Peter Bromberg [C# MVP] - 15 Feb 2008 20:13 GMT
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/microsoft.public.windows.vista.security/browse_th
read/thread/7b44901dc7d50ed3/2571bf72d0ad75a6?hl=en&lnk=st&q=mt+manifest+Vista+a
dministrator#2571bf72d0ad75a6
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
> Hi all.
>
[quoted text clipped - 8 lines]
>
> Thanks!
JamesB - 17 Feb 2008 11:24 GMT
> 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/microsoft.public.windows.vista.security/browse_th
read/thread/7b44901dc7d50ed3/2571bf72d0ad75a6?hl=en&lnk=st&q=mt+manifest+Vista+a
dministrator#2571bf72d0ad75a6
Thanks for the reply - i'll give it a try!