472,335 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,335 software developers and data experts.

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 1939
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Don | last post by:
QUESTIONS: 1. Has anyone figured out how to successfully install the Office 97 Pro Service Release 2 patch in Vista? 2. Has anyone successfully...
3
by: gourmet | last post by:
Hello! I need to restart the "Windows Audio Service" (audiosrv) via C#. I'm using the ServiceController Class to do this. It is no problem under...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course...
5
by: eliasen | last post by:
Hi I have created a Windows Service using C# and .NET2.0. The service is quite simple - right now it doesn't do anything except throwing an...
17
by: merrily | last post by:
Read in one forum the question someone asked after successfully (sort of) installing Picture It 2000 on new computer with Vista. Will this person or...
1
by: svandanapu | last post by:
Hi All, I written one windows service and its working fine. I Need to check the recovery settings of that service from one windows application....
1
by: rufusking | last post by:
My requirement is to change the IP Address of local system programatically using .net. IP Address should change to 10.1.2.100, subnet mask =...
2
by: Tam | last post by:
Im running into problems installing either VS 05 or 08 on a Vista Premium 64 bit machine and, ahem, it isnt going sweetly. When installing i get...
2
by: =?Utf-8?B?TUNN?= | last post by:
My development machine is running Vista x64. I cannot find the ASP.NET StateServer Service in my list of available Services. Do you know how I can...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.