473,325 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 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 1981
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 installed an Office 97 Pro CD (SR2 version) in...
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 XP and no problem under vista if UAC is...
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 Environment.UserName returns the service logon...
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 exception in the OnStart method. It used to something...
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 any other help me accomplish this install on...
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. How do I can get the recovery settings of(first...
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 = 255.255.255.0, default gateway=10.1.2.1 I have...
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 an "Error 1935.An error occured during the...
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 enable this?
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.