473,403 Members | 2,293 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,403 software developers and data experts.

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 servicecontroller app,
depending on the command is being executed or is ready.

Regards
Martin
Jan 30 '07 #1
1 2082
"Martin Arvidsson, Visual Systems AB" <ma**************@vsab.netwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
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.
Jan 30 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: ucasesoftware | last post by:
Dim myController As ServiceController myController = New ServiceController("myWrondName") i try : if myController is nothing then messagebox.show("This service doesn't exist" end if but...
1
by: Tom J | last post by:
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 commands sent to it. If I...
1
by: Maksim Chepel | last post by:
I'm trying to use ExecuteCommand method of System.ServiceProcess.ServiceController in my C# service controller app to make a custom call to my service. I'm getting this exception and my service...
2
by: Jonathan Leonard | last post by:
Hello, I'm using the .NET class ServiceController to start my service. After calling start, a subsequent call to ServiceController.Status is returning 'stopped.' I know the service is running...
5
by: Primera | last post by:
I use the following method to stop the WMI service: string serviceName = "Windows Management Instrumentation" public static void stopService(string serviceName) { ServiceController services =...
3
by: Bram Hoefnagel | last post by:
Hi, On the 1.1 framework I couldn't find a solution to get a list of services from an other PC. Only a list of services on My local PC. (witch is strange i guess, as you look to the MSDN doc.) ...
7
by: =?Utf-8?B?YXVsZGg=?= | last post by:
hello, i'm try to research the way to open a remote machine's to collect the services and processes. i have the local data collection running but i can not figure out what MSDN or the C# help file...
3
by: MedIt | last post by:
Hi all, I am trying to controll a service programatically using the ServiceController class .net c#. It is giving me an error that it cannot find the service name. I have tried it stopping...
6
by: Kerem Gümrükcü | last post by:
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 all Codes below 127 to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.