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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You beat me to it, DEV ;)
ASKER
DEVLitehouse,
I'm sorry but what's the actual command syntax?
I'm sorry but what's the actual command syntax?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry I meant to say display name instead of service name.
BTW, NET START will only list *running* services, and no drivers.
ASKER
Thanks for your help guys!