func RunService(isDebug bool) {
	var err error
	if isDebug {
		elog = debug.New(config.ServiceName)
	} else {
		elog, err = eventlog.Open(config.ServiceName)
		if err != nil {
			return
		}
	}
	defer elog.Close()

	run := svc.Run
	if isDebug {
		run = debug.Run
	}
	elog.Info(altServiceStarted, config.ServiceName)
	err = run(config.ServiceName, &sysprobeWindowService{})
	if err != nil {
		elog.Error(serviceFailed, err.Error())
		return
	}
	elog.Info(serviceStopped, config.ServiceName)
}
// RunService runs the System Probe as a Windows service
RunService runs the System Probe as a Windows service
// RunService runs the System Probe as a Windows service
func RunService(isDebug bool) {
	var err error
	if isDebug {
		elog = debug.New(config.ServiceName)
	} else {
		elog, err = eventlog.Open(config.ServiceName)
		if err != nil {
			return
		}
	}
	defer elog.Close()
	run := svc.Run
	if isDebug {
		run = debug.Run
	}
	elog.Info(altServiceStarted, config.ServiceName)
	err = run(config.ServiceName, &sysprobeWindowService{})
	if err != nil {
		elog.Error(serviceFailed, err.Error())
		return
	}
	elog.Info(serviceStopped, config.ServiceName)
}
func RunService ( isDebug bool ) { var err error if isDebug { elog = debug . New ( config . ServiceName ) } else { elog , err = eventlog . Open ( config . ServiceName ) if err != nil { return } } defer elog . Close ( ) run := svc . Run if isDebug { run = debug . Run } elog . Info ( altServiceStarted , config . ServiceName ) err = run ( config . ServiceName , & sysprobeWindowService { } ) if err != nil { elog . Error ( serviceFailed , err . Error ( ) ) return } elog . Info ( serviceStopped , config . ServiceName ) }
RunService runs the System Probe as a Windows service
RunService runs the System Probe as a Windows service