|
|
||||||
|
#1
|
|
|
|
|
I have an administrative program (installed by click-once) that starts/stops
a service running on the same machine. The ServiceController class can check the status of the service, but as soon as it attempts to start/stop the service on Vista which has UAC enabled (it runs fine on XP and when UAC is disabled), I get this message: Cannot open <servicename> service on computer <computername>. Access is denied Presumably it's all about permissions. The application was installed as a fully trusted click-once program, and is running under a user that has administrative rights; the service is running under the LocalSystem account. This is a very common scenario. Can someone point me towards a solution? |
|
|
|
#2
|
|
|
|
|
I assume the issue is that it's irrelevant if you're an admin because you
still run with limited user rights, and apparently Vista elevation manifests are not supported for ClickOnce web-deployed apps. See if this helps: http://www.geektieguy.com/2007/08/25...-applications/ |
|
#3
|
|
|
|
|
You have it in one. Everything I have seen leads me to be conclude that
ClickOnce applications are not appropriate, if one wants to use something like ServiceController under Vista. I updated the application manifest to use enhanced rights, built a bootstrap rather than a ClickOnce installation, and everything worked fine under Vista with UAC (albeit with the expected prompts). "Phil Wilson" wrote: [..] |
|
|
| Similar Threads | |
| Thread | Thread Starter |
| ServiceController?? Howdy! I am trying to write an application that will control some services I am writing. However, in VS 2008 (VB) I don't appear to have the... |
Cory J. Laidlaw, Beyond01.com |
| Q: ServiceController Hi! I am using a ServiceController to start and stop my service. If i use the service localy and use the service controller it works fine. If i install the service on my... |
Martin Arvidsson, Visual Systems AB |
| Q: ServiceController and ExecuteCommand Hi! I issue a ExecuteCommand, is there a way to get a response from the service when the command has been executed? What i want to do is to change an icon on the... |
Martin Arvidsson, Visual Systems AB |
| ServiceController Dim myController As ServiceController myController = New ServiceController("myWrondName") i try : if myController is nothing then messagebox.show("This service doesn't... |
ucasesoftware |
| ServiceController.ServiceType How do I set the ServiceType to InteractiveProcess, since this property is read only? Is there a way to set this with code in my Installer class, or a standalone process? I... |
Bill Burris |
|
Privacy Policy | All times are GMT. The time now is 06:47 PM.
|
|
|