/// <summary> /// Open locations of the startup entries in respective applications. (regedit, win explorer, task scheduler) /// </summary> public static void OpenStartupEntryLocations(IEnumerable <StartupEntryBase> selection) { var startupEntryBases = selection as IList <StartupEntryBase> ?? selection.ToList(); var regOpened = false; if (startupEntryBases.Any(x => x is TaskEntry)) { TaskService.Instance.StartSystemTaskSchedulerManager(); } var browserAddon = startupEntryBases.OfType <BrowserHelperEntry>().FirstOrDefault(); if (browserAddon != null) { RegistryTools.OpenRegKeyInRegedit(browserAddon.FullLongName); regOpened = true; } foreach (var item in startupEntryBases) { if (item is StartupEntry s && s.IsRegKey) { if (!regOpened) { RegistryTools.OpenRegKeyInRegedit(item.ParentLongName); regOpened = true; } }
public override void Open() { if (!RegKeyExists()) { throw new IOException($"Key \"{FullRegKeyPath}\" doesn't exist or can't be accessed"); } RegistryTools.OpenRegKeyInRegedit(FullRegKeyPath); }
/// <summary> /// Open locations of the startup entries in respective applications. (regedit, win explorer, task scheduler) /// </summary> public static void OpenStartupEntryLocations(IEnumerable <StartupEntryBase> selection) { var startupEntryBases = selection as IList <StartupEntryBase> ?? selection.ToList(); var regOpened = false; if (startupEntryBases.Any(x => x is TaskEntry)) { TaskService.Instance.StartSystemTaskSchedulerManager(); } var browserAddon = startupEntryBases.OfType <BrowserHelperEntry>().FirstOrDefault(); if (browserAddon != null) { RegistryTools.OpenRegKeyInRegedit(browserAddon.FullLongName); regOpened = true; } foreach (var item in startupEntryBases) { var s = item as StartupEntry; if (s != null && s.IsRegKey) { if (!regOpened) { RegistryTools.OpenRegKeyInRegedit(item.ParentLongName); regOpened = true; } } else if (!string.IsNullOrEmpty(item.FullLongName)) { WindowsTools.OpenExplorerFocusedOnObject(item.FullLongName); } else if (!string.IsNullOrEmpty(item.CommandFilePath)) { WindowsTools.OpenExplorerFocusedOnObject(item.CommandFilePath); } } }
public override void Open() { RegistryTools.OpenRegKeyInRegedit(ParentPath); }
public override void Open() { RegistryTools.OpenRegKeyInRegedit(FullName); }