Link to home
Start Free TrialLog in
Avatar of student_23
student_23

asked on

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?
ASKER CERTIFIED SOLUTION
Avatar of DEVLitehouse
DEVLitehouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You beat me to it, DEV ;)
Avatar of student_23
student_23

ASKER

DEVLitehouse,

I'm sorry but what's the actual command syntax?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ben Personick (Previously QCubed)
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

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry I meant to say display name instead of service name.
BTW, NET START will only list *running* services, and no drivers.
Thanks for your help guys!