Description, Syntax, Examples, Return Codes
This Windows 32-bit console mode program is used to determine the status of a Service on a specified computer. It can be used to determine if a service is running (or not) on a remote computer.
WINSERV [/?]
WINSERV [/C[:]ComputerName] [/D] [/L[:][A][D][I][S]] [/N] [/V]
WINSERV [/C[:]ComputerName] [/D] [/N] [/V] ServiceName
where /? Displays this help screen.
/C Specifies the name of the computer to check
Default is the computer that is running the program
/D Display debug messages
/L List all services and/or drivers default is (AIS)
A = List active drivers / services
D = List drivers
I = List inactive drivers / services
S = List services
/N Do not display output to the screen
/V Verbose output with all the details.
ComputerName is the 1-15 character workstation name.
ServiceName is the 1-256 character name of the service
To check if the "FTP Server" service is running on TESTPC-1
(Note: The service name is different from the display name, seen when you type "NET START" ! Use "WINSERV /LAS" to get the actual service name.)
WINSERV /C:TESTPC-1 FTPSVC
To list all details on all active drivers running on this PC:
WINSERV /LAD /V
| OK_NOERROR | 0 |
| OK_SERVICE_RUNNING | 1 |
| OK_SERVICE_START_PENDING | 2 |
| OK_SERVICE_CONTINUE_PENDING | 3 |
| OK_SERVICE_PAUSE_PENDING | 4 |
| OK_SERVICE_PAUSED | 5 |
| OK_SERVICE_STOP_PENDING | 6 |
| OK_SERVICE_STOPPED | 7 |
| ERR_SERVICE_DOES_NOT_EXIST | 8 |
| ERR_ACCESS_DENIED1 | 50 |
| ERR_DATABASE_DOES_NOT_EXIST | 51 |
| ERR_INVALID_PARAMETER1 | 52 |
| ERR_ACCESS_DENIED2 | 63 |
| ERR_INVALID_HANDLE1 | 64 |
| ERR_INVALID_NAME | 65 |
| ERR_ACCESS_DENIED3 | 66 |
| ERR_INVALID_HANDLE2 | 67 |
| ERR_ACCESS_DENIED4 | 73 |
| ERR_INVALID_HANDLE3 | 74 |
| ERR_INVALID_PARAMETER2 | 75 |
| ERR_GETCOMPUTERNAME | 88 |
Copyright : 1997 Computer Problem Solutions, all rights reserved.