keyongtech


  keyongtech > dotnet.languages.* > dotnet.languages.csharp > 01/2007

 #1  
01-30-07, 04:38 PM
Martin Arvidsson, Visual Systems AB
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 servicecontroller app,
depending on the command is being executed or is ready.

Regards
Martin
 #2  
01-30-07, 04:56 PM
Willy Denoyette [MVP]
"Martin Arvidsson, Visual Systems AB" <martin.arvidsson> wrote in message
news:4384
> Hi!
>
> I issue a ExecuteCommand, is there a way to get a response from the service when the
> command has been executed?
>


No, don't forget that you aren't talking to your Service, you are passing a command to the
SCM who, at his turn passes the command to the service, however there is no way for the
service to communicate back to the SCM.

> What i want to do is to change an icon on the servicecontroller app, depending on the
> command is being executed or is ready.
>

Assuming you have AutoLog property set to true, for every command that's been executed, the
SCM writes a fail/success message to the eventlog, maybe you can try to read this message.
Another option is to forget about the ServiceController and use remoting to pass user
commands to a service.

Willy.
Similar Threads
ServiceController.ExecuteCommand() throws Exception,...

Hi, i have a application that can open an user defined service at will and can send a User Definded Control Code to it. I know that the OS restricts/reserves the usage of...

ExecuteCommand commands

Hi, Where can i find a full list of commands that applicationObject.ExecuteCommand(cmd, par); accepts?

ExecuteCommand Command

I'm trying to use the ExecuteCommand command in a VB macro. I'm using the following line: ExecuteCommand "GoTo" What I really want to pass are two parameters for what type...

Getting System.ServiceProcess.ServiceController.ExecuteCommand(int) to work

What do I have to do to get System.ServiceProcess.ServiceController.ExecuteCommand(int) to work? I have written a service that overrides OnCustomCommand to handle...

Executecommand similair function for .net?

On a previous Addin for VS 6 there was a handy function that could execute all "Commands" shell commands (Scripts) programaticaly is there a similair function for...


All times are GMT. The time now is 09:42 AM. | Privacy Policy