Q: ServiceController and ExecuteCommand

  • Thread starter Martin Arvidsson, Visual Systems AB
  • Start date
M

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
 
W

Willy Denoyette [MVP]

Martin Arvidsson said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top