func (c *Concierge) Enable() error {
	var service *mgr.Service
	ok, err := c.ServiceExists()
	if err != nil {
		return errors.Wrap(err, "error checking if the service exists")
	}
	if !ok {
		if err = c.CreateService(); err != nil {
			return errors.Wrap(err, "error creating the service")
		}
	}

	if service, err = c.fetchService(); err != nil {
		return errors.Wrap(err, "error fetching the service")
	}
	defer service.Close()

	return service.Start()
}
// Enable will start the Windows Service. If the service doesn't exist it will create it.
Enable will start the Windows Service. If the service doesn't exist it will create it.
// Enable will start the Windows Service . If the service doesn ' t exist it will create it .
func (c *Concierge) Enable() error {
	var service *mgr.Service
	ok, err := c.ServiceExists()
	if err != nil {
		return errors.Wrap(err, "error checking if the service exists")
	}
	if !ok {
		if err = c.CreateService(); err != nil {
			return errors.Wrap(err, "error creating the service")
		}
	}
	if service, err = c.fetchService(); err != nil {
		return errors.Wrap(err, "error fetching the service")
	}
	defer service.Close()
	return service.Start()
}
func ( c * Concierge ) Enable ( ) error { var service * mgr . Service ok , err := c . ServiceExists ( ) if err != nil { return errors . Wrap ( err , " " ) } if ! ok { if err = c . CreateService ( ) ; err != nil { return errors . Wrap ( err , " " ) } } if service , err = c . fetchService ( ) ; err != nil { return errors . Wrap ( err , " " ) } defer service . Close ( ) return service . Start ( ) }
Enable will start the Windows Service.
Enable will start the Windows Service .