Solved

NET START command in Windows 7

Posted on 2010-09-22
12
1,147 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
Comment Utility
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
Comment Utility
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
Comment Utility
You beat me to it, DEV ;)
0
 

Author Comment

by:student_23
Comment Utility
DEVLitehouse,

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

Assisted Solution

by:DEVLitehouse
DEVLitehouse earned 83 total points
Comment Utility
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
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 11

Assisted Solution

by:Ben Personick
Ben Personick earned 42 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry I meant to say display name instead of service name.
0
 
LVL 68

Expert Comment

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

Author Closing Comment

by:student_23
Comment Utility
Thanks for your help guys!
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Hi Friends, These registry tweaks will help you optimizing your Windows 7 system for any VDI. This will improve the machine performanance and can be used on normal systems also. These are few registry tweaks which will add value by enhancing the …
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now