S
Smurfman-MSDN
Using VB2008 and Vista Ultimate x64
I have an application I have written that is two part - one is a Windows
Service the other is an interface for the settings for that service.
On my XP machine the service installs just fine and the following code works
just fine:
Me.Interface_ServiceController = New System.ServiceProcess.ServiceController
With Me.Interface_ServiceController
.ServiceName = ServiceNameIn
.Start()
End With
ServiceNameIn is defined as a String being passed to my function. If the
service starts the function returns True if not it returns false.
One XP I am able to start the serice from my interface with no issue.
In Vista I am getting an error:
Cannot open XYZService on computer '.'
Here is what I tried.
Net Start XYZService from a CMD prompt - I get an Error 5 Access Denied.
Verified that the service is set to manual run.
Manually starting the service from Service.MSC - works just fine.
I thought Originally the service name was screwing it up - "X Y Z Service"
so I renamed the service to XYZService with a different Display name. This
did not matter.
I tried to define a machineName this too did not matter.
I am back to the permissions thing. Is there something in Vista that is
blocking my ability to programatically start this service?
Interestingly, I can query the service and I can get the status of it either
running or stopped.
Any suggestions?
J
I have an application I have written that is two part - one is a Windows
Service the other is an interface for the settings for that service.
On my XP machine the service installs just fine and the following code works
just fine:
Me.Interface_ServiceController = New System.ServiceProcess.ServiceController
With Me.Interface_ServiceController
.ServiceName = ServiceNameIn
.Start()
End With
ServiceNameIn is defined as a String being passed to my function. If the
service starts the function returns True if not it returns false.
One XP I am able to start the serice from my interface with no issue.
In Vista I am getting an error:
Cannot open XYZService on computer '.'
Here is what I tried.
Net Start XYZService from a CMD prompt - I get an Error 5 Access Denied.
Verified that the service is set to manual run.
Manually starting the service from Service.MSC - works just fine.
I thought Originally the service name was screwing it up - "X Y Z Service"
so I renamed the service to XYZService with a different Display name. This
did not matter.
I tried to define a machineName this too did not matter.
I am back to the permissions thing. Is there something in Vista that is
blocking my ability to programatically start this service?
Interestingly, I can query the service and I can get the status of it either
running or stopped.
Any suggestions?
J