C# Class Lookup.ServiceInstaller

Summary description for ServiceInstaller.
显示文件 Open project: hammackj/wintools

Public Methods

Method Description
InstallService ( string svcPath, string svcName, string svcDispName ) : bool

This method installs and runs the service in the service control manager.

UnInstallService ( string svcName ) : bool

This method uninstalls the service from the service conrol manager.

Private Methods

Method Description
CloseServiceHandle ( IntPtr SCHANDLE ) : void
ControlService ( IntPtr SVHANDLE, int dwControl, string lpServiceStatus ) : int
CreateService ( IntPtr SC_HANDLE, string lpSvcName, string lpDisplayName, int dwDesiredAccess, int dwServiceType, int dwStartType, int dwErrorControl, string lpPathName, string lpLoadOrderGroup, int lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword ) : IntPtr
DeleteService ( IntPtr SVHANDLE ) : int
GetLastError ( ) : int
OpenSCManager ( string lpMachineName, string lpSCDB, int scParameter ) : IntPtr
OpenService ( IntPtr SCHANDLE, string lpSvcName, int dwNumServiceArgs ) : IntPtr
StartService ( IntPtr SVHANDLE, int dwNumServiceArgs, string lpServiceArgVectors ) : int

Method Details

InstallService() public method

This method installs and runs the service in the service control manager.
public InstallService ( string svcPath, string svcName, string svcDispName ) : bool
svcPath string The complete path of the service.
svcName string Name of the service.
svcDispName string Display name of the service.
return bool

UnInstallService() public method

This method uninstalls the service from the service conrol manager.
public UnInstallService ( string svcName ) : bool
svcName string Name of the service to uninstall.
return bool