none
Service appear disabled until calling application is closed

    Question

  • We have custom windows service created for our application. 
    I am able to start the service by calling batch commands(see below) from desktop application shown as below - 
    - <service executable> -install
    - net start <servicename>
    But when try to stop and delete the service(see below), it goes in "Disabled" state when later checked in "service manager".
    And state is described as "Service is already marked for the deletion"
    - net stop SEChangeNotifier
    - <service executable> -remove
    - service executable calls "DeleteService" API 
    BOOL WINAPI DeleteService(
        _In_        SC_HANDLE   hService
        );

    But when the calling application is closed, service is removed from service manager as well(..good!)

    shwetank

    Wednesday, April 12, 2017 1:40 PM

All replies