public IList <AutoStartEntry> GetCurrentAutoStarts()
        {
            Logger.Trace("GetCurrentAutoStarts called");
            var serviceControllers = GetServiceControllers();
            var ret = new List <AutoStartEntry>();

            foreach (var sc in serviceControllers)
            {
                ServiceAutoStartEntry newAutoStart = GetAutoStartEntry(sc);
                ret.Add(newAutoStart);
            }
            return(ret);
        }
        protected ServiceAutoStartEntry GetAutoStartEntry(ServiceController sc)
        {
            var newAutoStart = new ServiceAutoStartEntry()
            {
                Date     = DateTime.Now,
                Category = Category,
                Value    = sc.DisplayName,
                Path     = sc.ServiceName,
            };

            newAutoStart.IsEnabled = IsEnabled(sc);
            if (sc.StartType != ServiceStartMode.Disabled)
            {
                newAutoStart.EnabledStartMode = sc.StartType;
            }

            return(newAutoStart);
        }