J
Jin
Hello..
I installed two NT services:
1, servicename: service1; it runs c:\test\myservice.exe without
dependency
hService = ::CreateService(hSCM,
m_szServiceName,
m_szServiceName,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START, // start condition
SERVICE_ERROR_NORMAL,
szFilePath,
NULL,
NULL,
NULL,
NULL,
NULL);
2, servicename: service2; it runs c:\test\myservice.exe depending on
MSSQLSERVER
hService = ::CreateService(hSCM,
m_szServiceName,
m_szServiceName,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START, // start condition
SERVICE_ERROR_NORMAL,
szFilePath,
NULL,
NULL,
"MSSQLSERVER\0"
NULL,
NULL);
I made a mistake that I installed the service2 before uninstalling
service1. Before I installed service2, I can install/uninstall
service1 successfully. After I installed the service2, I could not
delete the service1(my code calls DeleteService(hService)).
Is there any way I can delete the service1, like modifying the
register file?
Thank u
Best Jin
I installed two NT services:
1, servicename: service1; it runs c:\test\myservice.exe without
dependency
hService = ::CreateService(hSCM,
m_szServiceName,
m_szServiceName,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START, // start condition
SERVICE_ERROR_NORMAL,
szFilePath,
NULL,
NULL,
NULL,
NULL,
NULL);
2, servicename: service2; it runs c:\test\myservice.exe depending on
MSSQLSERVER
hService = ::CreateService(hSCM,
m_szServiceName,
m_szServiceName,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_DEMAND_START, // start condition
SERVICE_ERROR_NORMAL,
szFilePath,
NULL,
NULL,
"MSSQLSERVER\0"
NULL,
NULL);
I made a mistake that I installed the service2 before uninstalling
service1. Before I installed service2, I can install/uninstall
service1 successfully. After I installed the service2, I could not
delete the service1(my code calls DeleteService(hService)).
Is there any way I can delete the service1, like modifying the
register file?
Thank u
Best Jin