473,804 Members | 2,255 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 1568
Kondapanaidu,

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

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

"Kondapanai du" <kondapanaiduwr ote in message
news:Ol******** ******@TK2MSFTN GP04.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.Manageme nt namespace to select
all instances of the Win32_Service class through WMI.
What's wrong with using System.ServiceP rocess.GetServi ces() ??

Jul 5 '06 #3

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

Similar topics

7
1494
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 this list to find the best player at defending, attacking, midfield and goalkeeping. However there is more than one defender per team so I therefore need it to find the next best player.
5
15069
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
2482
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 what to do in order to obtain list of all such servers?! When you open Sql Service Manager (for sql server2000) you've got such list. Thanks,
5
2400
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 it. It reads in the file and sorts out the files into the four different lists. F.txt int main 2 " " help
2
1641
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 on. What I am trying to create is a form that has a text box in which you can type in part of a speakers name. After hiting enter I want to query our SQL database for the speakers with the matching last names and populate a speaker select box...
3
1538
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 using c library. but the problem is i don't know which function/structure is helped to list out this all, or if any command then please suggest me or if any source of c program is available then please forwarded to me..
0
1864
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 XML file. Printer names are names which are available to the system on which the service is running. Printers used are network printers and are added using Printers and Faxes -> Add a printer. To validate the printer I am using the following...
8
12206
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 http://www.sqldev.net/misc/ListSQLSvr.htm I run all of them on a Windows XP Professional 64bit machine which has 2 instances: mymachine\SQLExpress (Express Edition) and MSSQLSERVER (Developer Edition (64bit)) SQL Browser Service: not running
8
1741
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 // Gender Check data { char genCode; string firstName; } gWork; typedef list<GENCHECKNAMES;
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10599
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10346
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10347
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7635
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5531
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4308
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 we have to send another system
2
3832
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.