private static RegistryKey getSegmentKey(BootSegment segment) { return segment == BootSegment.global ? lmRunKey : cuRunKey; }
public static void RemoveFromBoot(BootSegment segment, string valueName) { getSegmentKey(segment).DeleteValue(valueName); }
public static bool StartsOnBoot(BootSegment segment, string valueName) { return getSegmentKey(segment).GetValue(valueName) != null; }
public static void AddToBoot(BootSegment segment, string valueName) { AddToBoot(segment, valueName, System.Reflection.Assembly.GetEntryAssembly().GetName().CodeBase); }
public static void AddToBoot(BootSegment segment, string valueName, string exePath) { getSegmentKey(segment).SetValue(valueName, exePath); }
public static bool StartsOnBoot(BootSegment segment, string valueName) { return(getSegmentKey(segment).GetValue(valueName) != null); }
private static RegistryKey getSegmentKey(BootSegment segment) { return(segment == BootSegment.global ? lmRunKey : cuRunKey); }