• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1203
  • Last Modified:

NET START command in Windows 7

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
student_23
Asked:
student_23
  • 2
  • 2
  • 2
  • +4
6 Solutions
 
DEVLitehouseCommented:
Try using sc. It gives a LOT more information than net start. Try the following command.

sc query
0
 
Element1910Commented:
NET uses the long name or display name. Try using the command "sc query" at the command line to get all service names.
0
 
Element1910Commented:
You beat me to it, DEV ;)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
student_23Author Commented:
DEVLitehouse,

I'm sorry but what's the actual command syntax?
0
 
DEVLitehouseCommented:
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
 
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
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
 
Ben Personick (Previously QCubed)Lead Network EngineerCommented:
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
 
Lee W, MVPTechnology and Business Process AdvisorCommented:
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
 
AmazingTechCommented:
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
 
AmazingTechCommented:
Sorry I meant to say display name instead of service name.
0
 
QlemoC++ DeveloperCommented:
BTW, NET START will only list *running* services, and no drivers.
0
 
student_23Author Commented:
Thanks for your help guys!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now