Solved

NET START command in Windows 7

Posted on 2010-09-22
12
1,159 Views
Last Modified: 2012-05-10
Hi everyone,

I'm trying to display the name of WIndows 7 services in DOS or command line.  When I run NET START it displays the 'Display name' and not the actual 'Service name' of all started services.  For example, the the 'Display name' for Plug and play is 'Plug and play' but the actual 'Service name' that you would use with NET STOP is 'PlugPlay'.  I'm just curious why do you get a list with the display names and not the actual service names when you run NET START?  Does anyone know how to display the actual service names in command line?
0
Comment
Question by:student_23
  • 2
  • 2
  • 2
  • +4
12 Comments
 
LVL 3

Accepted Solution

by:
DEVLitehouse earned 83 total points
ID: 33739975
Try using sc. It gives a LOT more information than net start. Try the following command.

sc query
0
 
LVL 7

Assisted Solution

by:Element1910
Element1910 earned 41 total points
ID: 33739985
NET uses the long name or display name. Try using the command "sc query" at the command line to get all service names.
0
 
LVL 7

Expert Comment

by:Element1910
ID: 33739987
You beat me to it, DEV ;)
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:student_23
ID: 33739991
DEVLitehouse,

I'm sorry but what's the actual command syntax?
0
 
LVL 3

Assisted Solution

by:DEVLitehouse
DEVLitehouse earned 83 total points
ID: 33740008
From the command prompt just type in the following:

SC Query

Like this:   C:\>SC Query

It will list all the current available services as well as whether they're running or not. Both the display name as well as the actual service name. It has great help information to help you with the uses of SC. To display the help just type:

SC

Like this:  C:\>SC

:)
0
 
LVL 11

Expert Comment

by:Ben Personick
ID: 33740009
Yup totally doable, just not by "NET", you need to use SC. (Available by default in Vist/2k8/7/2k8r2 -- resource kit if on an older OS)

See Attached batch file.  NOTE that in a batch file the %% are doubled so if you want to run this at a command prompt you will remove one of the % signs in each item

 and AFAIK the reasoning is that it;'s easier for people to understand the text names of things than the actual service names

@FOR /F "Tokens=1*" %A IN ('sc query ^| Find /I "Service_Name"') DO @ECHO %B

Open in new window

0
 
LVL 11

Assisted Solution

by:Ben Personick
Ben Personick earned 42 total points
ID: 33740021
wow lotta posters before me, I swear when I started writing my rather verbose response there were literally NO responses here.

Note what I did was make a loop that will show every service name, and ONLY the service name without the "SERVICE_NAME: " leading output or the status or any of the other stuff that the SC Command outputs.  I assumed you wanted a list for other reasons such as to act on the services later in a script.

Also, note that I didn't double up the quotes like this was being used in a batch file, but wrote it as if you would type it at the command prompt instead.  attached is how you would write this in a batch file

@FOR /F "Tokens=1*" %%A IN ('sc query ^| Find /I "Service_Name"') DO @ECHO %%B

Open in new window

0
 
LVL 95

Assisted Solution

by:Lee W, MVP
Lee W, MVP earned 42 total points
ID: 33740362
If you don't know the command syntax, you should always type the command /? - even if we provide BASIC syntax, you could be missing out on a lot of capability you simply didn't know to ask about - the /? should display a summarized help for almost all commands and you can learn them that way.

Further, you might want to bookmark the following link - it gives the basic command help and some examples for almost all Microsoft provided command line tools (both those included with the OS and those downloaded/obtained in resource kits and other Microsoft tool kits.
http://ss64.com/nt/
0
 
LVL 21

Assisted Solution

by:AmazingTech
AmazingTech earned 42 total points
ID: 33740889
You can do a NET STOP service name you just need to put the service name in quotes because of the space.

NET STOP "Plug and Play"
0
 
LVL 21

Expert Comment

by:AmazingTech
ID: 33740898
Sorry I meant to say display name instead of service name.
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 33745453
BTW, NET START will only list *running* services, and no drivers.
0
 

Author Closing Comment

by:student_23
ID: 33776604
Thanks for your help guys!
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question