private static void AddExternalProgramFromRegistry(TaskSettings taskSettings, string name, string fileName) { if (!taskSettings.ExternalPrograms.Exists(x => x.Name == name)) { string filePath = RegistryHelpers.SearchProgramPath(fileName); if (!string.IsNullOrEmpty(filePath)) { ExternalProgram externalProgram = new ExternalProgram(name, filePath); taskSettings.ExternalPrograms.Add(externalProgram); } } }