473,503 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to list available service names using C#



Hi,

I am using C#.NET 2.0 along with WIN2K Professional.

How to list available servicenames using C#(Under services.msc)

Please send me the example code for this.

Thanks in advance.

Thanks & regards
Kondapanaidu


*** Sent via Developersdex http://www.developersdex.com ***
Jul 4 '06 #1
2 1553
Kondapanaidu,

You should use the classes in the System.Management namespace to select
all instances of the Win32_Service class through WMI.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Kondapanaidu" <kondapanaiduwrote in message
news:Ol**************@TK2MSFTNGP04.phx.gbl...
>

Hi,

I am using C#.NET 2.0 along with WIN2K Professional.

How to list available servicenames using C#(Under services.msc)

Please send me the example code for this.

Thanks in advance.

Thanks & regards
Kondapanaidu


*** Sent via Developersdex http://www.developersdex.com ***

Jul 4 '06 #2
Nicholas Paldino [.NET/C# MVP] wrote:
Kondapanaidu,

You should use the classes in the System.Management namespace to select
all instances of the Win32_Service class through WMI.
What's wrong with using System.ServiceProcess.GetServices() ??

Jul 5 '06 #3

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

Similar topics

7
1478
by: Ben | last post by:
Hi In a list I have a number of soccer players. Each player has a different rating for attacking, defending, midfield fitness and goalkeeping. I have devised a while loop that goes through...
5
15045
by: Roger | last post by:
I would like to get a list of running processes on a remote machine. How is this possible via VB.Net? Is it possible? Can someone point me in the right direction. thanks, rog
1
2459
by: Piotrek Stachowicz | last post by:
Hi, I'd like to display list of all MS SQL servers which are available on the network (I write application which uses database located on one of the machines in my LAN). Has anyone got any idea...
5
2374
by: Little | last post by:
I have this program and I need to work on the test portion, which tests if a Val is in the list. It returns false no matter what could you look at the part and see what might need to be done to fix...
2
1622
by: Eli Silverman | last post by:
I am attempting to develop a form that lists available speakers for a meeting. One of my clients can have as many as about 800 contracted speakers and a variety of 100 topics that they can speak...
3
1516
by: solanki.chandrakant | last post by:
hi guys i m fresher to linux programming, and i want to list out the available service in linux i.e. i want to print name of service, location of service, startup type, and status of information...
0
1830
by: jigsmshah | last post by:
i am working on a project (windows service using VB.Net and C#) which gets the check details and check images from the database and prints the check to a printer. Printer name is configured in a...
8
12154
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm trying to get a list of SQL Server Instances thru a VB.NET application. I have tried GetDataSource and SMO. I have also tried using ListSQLSvr.exe from...
8
1718
by: Mike Copeland | last post by:
I am trying to learn/use the STL <listto implement a small application. I didn't get very far before I got a compile error that befuddles me. Here's the code: struct GENCHECK ...
0
7278
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
7328
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...
1
6988
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
7456
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
5578
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
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.