How To Delete Service In Windows

Today I like to show a simple “how to” to delete a Windows service. In this case I need delete it because was created with a wrong name (Is a Oracle Listener), after delete it I create again;

First of all, we query the actually status of listener. It is better stop the service before delete;

C:\Users\bbdd> query OracleOraDb11g_home1TNSListenerListener_gecae

SERVICE_NAME: OracleOraDb11g_home1TNSListenerListener_sogecae
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

With the next command and parameter we delete the service OracleOraDb11g_home1TNSListenerListener_gecae;

C:\Users\bbdd> delete OracleOraDb11g_home1TNSListenerListener_gecae
[SC] DeleteService SUCCESS

Check status again from sc command and get the next reply;

C:\Users\bbdd> query OracleOraDb11g_home1TNSListenerListener_sogecae
[SC] EnumQueryServicesStatus:OpenService FAILED 1060:

The specified service does not exist as an installed service.

HTH – Antonio NAVARRO.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s