Solved

NET START command in Windows 7

Posted on 2010-09-22
12
1,172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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
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 (Previously QCubed)
Ben Personick (Previously QCubed) 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…

730 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