rblog

Verify Windows service status from command line

The command to use is sc. First you need to know that every service has a display name and a service name. I banged my head into the wall until I realized that I could just type sc query to list all. Actually I typed sc query >> result.txt
Then I found the real name of the IBM HTTP Server 6.1-service and I could type


D:\HTTPServer61\bin>sc query IBMHTTPServer6.1
SERVICE_NAME: IBMHTTPServer6.1
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

My latest book: Guns, Germs and Steel

Guns, Germs, and Steel: The Fates of Human Societies is a 1997 book by Jared Diamond, professor of geography and physiology at the University of California, Los Angeles (UCLA). In 1998, it won the Pulitzer Prize for general non-fiction and the Aventis Prize for Best Science Book….

http://en.wikipedia.org/wiki/Guns,_Germs,_and_Steel

Recommended reading for everyone, nothing more to say!

Hjem