diff --git a/Directory.Packages.props b/Directory.Packages.props index 0eb8150..d8dec6a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -8,6 +8,8 @@ + + \ No newline at end of file diff --git a/PowerAutomate.Desktop.sln b/PowerAutomate.Desktop.sln index f01344b..3c5cd37 100644 --- a/PowerAutomate.Desktop.sln +++ b/PowerAutomate.Desktop.sln @@ -33,6 +33,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OpenAPI", "OpenAPI", "{6709 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PetStore.Client", "samples\PetStore.Client\PetStore.Client.csproj", "{A9858CCE-DDB1-4942-84BE-08991E46A818}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Modules.Windows.TaskScheduler.Actions", "modules\Modules.Windows.TaskScheduler.Actions\Modules.Windows.TaskScheduler.Actions.csproj", "{E7F31F2C-1091-4B82-A685-C7A74FC80A1D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -67,6 +69,10 @@ Global {A9858CCE-DDB1-4942-84BE-08991E46A818}.Debug|Any CPU.Build.0 = Debug|Any CPU {A9858CCE-DDB1-4942-84BE-08991E46A818}.Release|Any CPU.ActiveCfg = Release|Any CPU {A9858CCE-DDB1-4942-84BE-08991E46A818}.Release|Any CPU.Build.0 = Release|Any CPU + {E7F31F2C-1091-4B82-A685-C7A74FC80A1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E7F31F2C-1091-4B82-A685-C7A74FC80A1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E7F31F2C-1091-4B82-A685-C7A74FC80A1D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E7F31F2C-1091-4B82-A685-C7A74FC80A1D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -84,6 +90,7 @@ Global {6709150F-B5E8-4377-BAEA-5394C5340806} = {64A2FE14-920C-4A2F-8F4A-28B77CC84BA4} {3D0BC3F2-AB03-44A3-8FAF-599FB80DB717} = {6709150F-B5E8-4377-BAEA-5394C5340806} {A9858CCE-DDB1-4942-84BE-08991E46A818} = {6709150F-B5E8-4377-BAEA-5394C5340806} + {E7F31F2C-1091-4B82-A685-C7A74FC80A1D} = {3B78C634-DFD6-43DA-A30E-33AC42224BD4} EndGlobalSection GlobalSection(SharedMSBuildProjectFiles) = preSolution Modules.Actions.Shared\Modules.Actions.Shared.projitems*{7e19e2f1-6de7-4a0e-aed8-7cea38b166af}*SharedItemsImports = 13 diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskAction.cs new file mode 100644 index 0000000..404a7de --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskAction.cs @@ -0,0 +1,58 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "CreateTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class CreateTaskAction : ActionBase +{ + [InputArgument(Order = 4, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.NewTask(); + + taskService.RootFolder + .RegisterTaskDefinition(TaskName, task) + .Dispose(); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskActionAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskActionAction.cs new file mode 100644 index 0000000..1c90ea3 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskActionAction.cs @@ -0,0 +1,77 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "CreateTaskAction")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class CreateTaskActionAction : ActionBase +{ + [InputArgument(Order = 7, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 3, Group = Groups.General, Required = false)] + public string Arguments { get; set; } = null!; + + [InputArgument(Order = 8, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + public string Path { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string UserName { get; set; } = null!; + + [InputArgument(Order = 4, Group = Groups.General, Required = false)] + public string WorkingDirectory { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + using var execAction = new ExecAction(Path, Arguments, WorkingDirectory); + task.Definition.Actions.Add(execAction); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskTriggerAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskTriggerAction.cs new file mode 100644 index 0000000..a5ff01b --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/CreateTaskTriggerAction.cs @@ -0,0 +1,485 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.ActionSelectors; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; +using DayOfWeek = PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums.DayOfWeek; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "CreateTaskTrigger")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class CreateTaskTriggerAction : ActionBase +{ + [InputArgument(Order = 24, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 3, Group = Groups.General)] + public short DaysInterval { get; set; } + + [InputArgument(Order = 6, Group = Groups.General)] + public List DaysOfMonth { get; set; } = null!; + + [InputArgument(Order = 9, Group = Groups.General)] + public List DaysOfWeek { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + public TimeSpan Delay { get; set; } + + [InputArgument(Order = 26)] + [DefaultValue(true)] + public bool Enabled { get; set; } + + [InputArgument(Order = 16, Group = Groups.General)] + public DateTime EndBoundary { get; set; } + + [InputArgument(Order = 20, Group = Groups.General)] + public string Id { get; set; } = null!; + + [InputArgument(Order = 7, Group = Groups.General)] + public List MonthsOfYear { get; set; } = null!; + + [InputArgument(Order = 25, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 4, Group = Groups.General)] + public TimeSpan RandomDelay { get; set; } + + [InputArgument(Order = 18, Group = Groups.General)] + public TimeSpan RepetitionDuration { get; set; } + + [InputArgument(Order = 17, Group = Groups.General)] + public TimeSpan RepetitionInterval { get; set; } + + [InputArgument(Order = 19, Group = Groups.General)] + [DefaultValue(false)] + public bool RepetitionStopAtDurationEnd { get; set; } + + [InputArgument(Order = 8, Group = Groups.General)] + [DefaultValue(false)] + public bool RunOnLastDayOfMonth { get; set; } + + [InputArgument(Order = 15, Group = Groups.General)] + public DateTime StartBoundary { get; set; } + + [InputArgument(Order = 14, Group = Groups.General)] + [DefaultValue(SessionStateChangeType.ConsoleConnect)] + public SessionStateChangeType State { get; set; } + + [InputArgument(Order = 12, Group = Groups.General)] + public string Subscription { get; set; } = null!; + + [InputArgument(Order = 22, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 21, Group = Groups.General)] + public TimeSpan Timeout { get; set; } + + [InputArgument(Order = 0, Group = Groups.General)] + [DefaultValue(TriggerType.Boot)] + public TriggerType Type { get; set; } + + [InputArgument(Order = 5, Group = Groups.General)] + public string UserId { get; set; } = null!; + + [InputArgument(Order = 23, Required = false)] + public string UserName { get; set; } = null!; + + [InputArgument(Order = 13, Group = Groups.General)] + public List ValueQueries { get; set; } = null!; + + [InputArgument(Order = 11, Group = Groups.General)] + public short WeeksInterval { get; set; } + + [InputArgument(Order = 10, Group = Groups.General)] + public List WeeksOfMonth { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + using Trigger trigger = Type switch + { + TriggerType.Boot => new BootTrigger + { + Delay = Delay + }, + TriggerType.Daily => new DailyTrigger + { + StartBoundary = StartBoundary, + DaysInterval = DaysInterval, + RandomDelay = RandomDelay + }, + TriggerType.Event => new EventTrigger + { + Subscription = Subscription, + ValueQueries = + { + ["Name"] = "Value" + } + }, + TriggerType.Idle => new IdleTrigger + { + StartBoundary = StartBoundary + }, + TriggerType.Logon => new LogonTrigger + { + Delay = Delay, + UserId = UserId + }, + TriggerType.MonthlyDayOfWeek => new MonthlyDOWTrigger + { + StartBoundary = StartBoundary, + DaysOfWeek = DaysOfWeek.ToAbstraction(), + MonthsOfYear = MonthsOfYear.ToAbstraction(), + WeeksOfMonth = WeeksOfMonth.ToAbstraction() + }, + TriggerType.Monthly => new MonthlyTrigger + { + StartBoundary = StartBoundary, + DaysOfMonth = DaysOfMonth.ToArray(), + MonthsOfYear = MonthsOfYear.ToAbstraction(), + RunOnLastDayOfMonth = RunOnLastDayOfMonth + }, + TriggerType.Registration => new RegistrationTrigger + { + Delay = Delay + }, + TriggerType.SessionStateChange => new SessionStateChangeTrigger + { + StateChange = State.ToAbstraction() + }, + TriggerType.Time => new TimeTrigger + { + StartBoundary = StartBoundary + }, + TriggerType.Weekly => new WeeklyTrigger + { + StartBoundary = StartBoundary, + DaysOfWeek = DaysOfWeek.ToAbstraction(), + WeeksInterval = WeeksInterval + }, + _ => throw new ArgumentOutOfRangeException() + }; + trigger.Id = Id; + trigger.Enabled = Enabled; + trigger.StartBoundary = StartBoundary; + trigger.EndBoundary = EndBoundary; + trigger.ExecutionTimeLimit = Timeout; + trigger.Repetition.Duration = RepetitionDuration; + trigger.Repetition.Interval = RepetitionInterval; + trigger.Repetition.StopAtDurationEnd = RepetitionStopAtDurationEnd; + + task.Definition.Triggers.Add(trigger); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddBootTriggerToTaskActionSelector : ActionSelector +{ + public AddBootTriggerToTaskActionSelector() + { + UseName("Boot"); + Prop(s => s.Type).ShouldBe(TriggerType.Boot); + + ShowAll(); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddDailyTriggerToTaskActionSelector : ActionSelector +{ + public AddDailyTriggerToTaskActionSelector() + { + UseName("Daily"); + Prop(s => s.Type).ShouldBe(TriggerType.Daily); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddIdleTriggerToTaskActionSelector : ActionSelector +{ + public AddIdleTriggerToTaskActionSelector() + { + UseName("Idle"); + Prop(s => s.Type).ShouldBe(TriggerType.Idle); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddLogonTriggerToTaskActionSelector : ActionSelector +{ + public AddLogonTriggerToTaskActionSelector() + { + UseName("Logon"); + Prop(s => s.Type).ShouldBe(TriggerType.Logon); + + ShowAll(); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddMonthlyTriggerToTaskActionSelector : ActionSelector +{ + public AddMonthlyTriggerToTaskActionSelector() + { + UseName("Monthly"); + Prop(s => s.Type).ShouldBe(TriggerType.Monthly); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.WeeksOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddMonthlyDayOfWeekTriggerToTaskActionSelector : ActionSelector +{ + public AddMonthlyDayOfWeekTriggerToTaskActionSelector() + { + UseName("MonthlyDayOfWeek"); + Prop(s => s.Type).ShouldBe(TriggerType.MonthlyDayOfWeek); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfMonth); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddTimeTriggerToTaskActionSelector : ActionSelector +{ + public AddTimeTriggerToTaskActionSelector() + { + UseName("Time"); + Prop(s => s.Type).ShouldBe(TriggerType.Time); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddWeeklyTriggerToTaskActionSelector : ActionSelector +{ + public AddWeeklyTriggerToTaskActionSelector() + { + UseName("Weekly"); + Prop(s => s.Type).ShouldBe(TriggerType.Weekly); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddEventTriggerToTaskActionSelector : ActionSelector +{ + public AddEventTriggerToTaskActionSelector() + { + UseName("Event"); + Prop(s => s.Type).ShouldBe(TriggerType.Event); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddRegistrationTriggerToTaskActionSelector : ActionSelector +{ + public AddRegistrationTriggerToTaskActionSelector() + { + UseName("Registration"); + Prop(s => s.Type).ShouldBe(TriggerType.Registration); + + ShowAll(); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + Hide(s => s.State); + } +} + +[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class AddSessionStateChangeTriggerToTaskActionSelector : ActionSelector +{ + public AddSessionStateChangeTriggerToTaskActionSelector() + { + UseName("SessionStateChange"); + Prop(s => s.Type).ShouldBe(TriggerType.SessionStateChange); + + ShowAll(); + Hide(s => s.Delay); + Hide(s => s.DaysInterval); + Hide(s => s.RandomDelay); + Hide(s => s.UserId); + Hide(s => s.DaysOfWeek); + Hide(s => s.DaysOfMonth); + Hide(s => s.WeeksOfMonth); + Hide(s => s.MonthsOfYear); + Hide(s => s.RunOnLastDayOfMonth); + Hide(s => s.WeeksInterval); + Hide(s => s.Subscription); + Hide(s => s.ValueQueries); + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskAction.cs new file mode 100644 index 0000000..9080ba5 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskAction.cs @@ -0,0 +1,74 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "DeleteTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class DeleteTaskAction : ActionBase +{ + [InputArgument(Order = 4, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + try + { + task.Folder.DeleteTask(task.Name); + } + catch (FileNotFoundException) + { + throw new TaskNotFoundException(TaskName); + } + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskActionAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskActionAction.cs new file mode 100644 index 0000000..b63176e --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskActionAction.cs @@ -0,0 +1,97 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "DeleteTaskAction")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.TaskActionNotFound)] +[Throws(ErrorCodes.TaskActionUnknown)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class DeleteTaskActionAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + public string ActionId { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + try + { + using var action = task.Definition.Actions.FirstOrDefault(action => action.Id == ActionId); + if (action is null) + { + throw new TaskActionNotFoundException(TaskName, ActionId); + } + + if (!task.Definition.Actions.Remove(action)) + { + throw new TaskActionException(TaskName, ActionId, $"Could not delete action '{ActionId}' in task '{TaskName}'"); + } + } + catch (FileNotFoundException) + { + throw new TaskActionNotFoundException(TaskName, ActionId); + } + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (TaskActionNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskActionNotFound, ex.Message, ex); + } + catch (TaskActionException ex) + { + throw new ActionException(ErrorCodes.TaskActionUnknown, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskTriggerAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskTriggerAction.cs new file mode 100644 index 0000000..7b6a839 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/DeleteTaskTriggerAction.cs @@ -0,0 +1,97 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.IO; +using System.Linq; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "DeleteTaskTrigger")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.TaskTriggerNotFound)] +[Throws(ErrorCodes.TaskTriggerUnknown)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class DeleteTaskTriggerAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + public string TriggerId { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + try + { + using var trigger = task.Definition.Triggers.FirstOrDefault(trigger => trigger.Id == TriggerId); + if (trigger is null) + { + throw new TaskTriggerNotFoundException(TaskName, TriggerId); + } + + if (!task.Definition.Triggers.Remove(trigger)) + { + throw new TaskTriggerException(TaskName, TriggerId, $"Could not delete trigger '{TriggerId}' in task '{TaskName}'"); + } + } + catch (FileNotFoundException) + { + throw new TaskTriggerNotFoundException(TaskName, TriggerId); + } + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (TaskTriggerNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskTriggerNotFound, ex.Message, ex); + } + catch (TaskTriggerException ex) + { + throw new ActionException(ErrorCodes.TaskTriggerNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/ExportTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ExportTaskAction.cs new file mode 100644 index 0000000..5c79213 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ExportTaskAction.cs @@ -0,0 +1,69 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "ExportTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class ExportTaskAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 2)] + public string FileName { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + task.Export(FileName); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetFolderTasksAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetFolderTasksAction.cs new file mode 100644 index 0000000..be6959f --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetFolderTasksAction.cs @@ -0,0 +1,90 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Text.RegularExpressions; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "GetFolderTasks")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.FolderNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class GetFolderTasksAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General, Required = false)] + public string Filter { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string FolderPath { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [OutputArgument(Order = 1)] + public List TaskNames { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + Regex? regex = null; + + if (!string.IsNullOrWhiteSpace(Filter)) + { + regex = new Regex(Filter); + } + + using var taskFolder = taskService.GetFolder(FolderPath); + if (taskFolder is null) + { + throw new FolderNotFoundException(FolderPath); + } + + using var taskCollection = taskFolder.GetTasks(regex); + var taskNames = new List(); + + foreach (var task in taskCollection) + { + taskNames.Add(task.Name); + task.Dispose(); + } + + TaskNames = taskNames; + } + catch (FolderNotFoundException ex) + { + throw new ActionException(ErrorCodes.FolderNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskAction.cs new file mode 100644 index 0000000..bd7aa98 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskAction.cs @@ -0,0 +1,71 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Types; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "GetTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class GetTaskAction : ActionBase +{ + [InputArgument(Order = 4, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Required = false)] + public string TargetServer { get; set; } = null!; + + [OutputArgument(Order = 1)] + public TaskObject Task { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + Task = task.ToAction(); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskActionAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskActionAction.cs new file mode 100644 index 0000000..cee4fd2 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskActionAction.cs @@ -0,0 +1,86 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Types; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "GetTaskAction")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.TaskActionNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class GetTaskActionAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [OutputArgument(Order = 1)] + public TaskActionObject TaskAction { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + public string ActionId { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + using var action = task.Definition.Actions.FirstOrDefault(action => action.Id == ActionId); + if (action is null) + { + throw new TaskActionNotFoundException(task.Name, ActionId); + } + + TaskAction = action.ToAction(task.Name); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (TaskActionNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskActionNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskActionsAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskActionsAction.cs new file mode 100644 index 0000000..7fb83d3 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskActionsAction.cs @@ -0,0 +1,79 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "GetTaskActions")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class GetTaskActionsAction : ActionBase +{ + [InputArgument(Order = 4, Required = false)] + public string AccountDomain { get; set; } = null!; + + [OutputArgument(Order = 1)] + public List Actions { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + using var actionCollection = task.Definition.Actions; + var actions = new List(); + + foreach (var action in actionCollection) + { + actions.Add(action.Id); + action.Dispose(); + } + + Actions = actions; + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskTriggerAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskTriggerAction.cs new file mode 100644 index 0000000..a573fdb --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskTriggerAction.cs @@ -0,0 +1,86 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Types; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "GetTaskTrigger")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.TaskTriggerNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class GetTaskTriggerAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [OutputArgument(Order = 1)] + public TaskTriggerObject TaskTrigger { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + public string TriggerId { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + using var trigger = task.Definition.Triggers.FirstOrDefault(trigger => trigger.Id == TriggerId); + if (trigger is null) + { + throw new TaskTriggerNotFoundException(task.Name, TriggerId); + } + + TaskTrigger = trigger.ToAction(task.Name); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (TaskTriggerNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskTriggerNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskTriggersAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskTriggersAction.cs new file mode 100644 index 0000000..334c18e --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/GetTaskTriggersAction.cs @@ -0,0 +1,79 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "GetTaskTriggers")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class GetTaskTriggersAction : ActionBase +{ + [InputArgument(Order = 4, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [OutputArgument(Order = 1)] + public List Triggers { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + using var triggerCollection = task.Definition.Triggers; + var triggers = new List(); + + foreach (var trigger in triggerCollection) + { + triggers.Add(trigger.Id); + trigger.Dispose(); + } + + Triggers = triggers; + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/ImportTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ImportTaskAction.cs new file mode 100644 index 0000000..ba217b4 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ImportTaskAction.cs @@ -0,0 +1,57 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "ImportTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class ImportTaskAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 2)] + public string FileName { get; set; } = null!; + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + taskService.RootFolder.ImportTask(TaskName, FileName).Dispose(); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/StartTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/StartTaskAction.cs new file mode 100644 index 0000000..45b0821 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/StartTaskAction.cs @@ -0,0 +1,66 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "StartTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class StartTaskAction : ActionBase +{ + [InputArgument(Order = 4, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + task.Run(); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/StopTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/StopTaskAction.cs new file mode 100644 index 0000000..4bb62ad --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/StopTaskAction.cs @@ -0,0 +1,66 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "StopTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class StopTaskAction : ActionBase +{ + [InputArgument(Order = 4, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 2, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + task.Stop(); + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/ToggleTaskAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ToggleTaskAction.cs new file mode 100644 index 0000000..52b64d4 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ToggleTaskAction.cs @@ -0,0 +1,71 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "ToggleTask")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class ToggleTaskAction : ActionBase +{ + [InputArgument(Order = 5, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + [DefaultValue(true)] + public bool Enabled { get; set; } + + [InputArgument(Order = 6, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 3, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + task.Enabled = Enabled; + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Actions/ToggleTaskTriggerAction.cs b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ToggleTaskTriggerAction.cs new file mode 100644 index 0000000..d01896f --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Actions/ToggleTaskTriggerAction.cs @@ -0,0 +1,86 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; +using System.Linq; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Actions.Shared; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Actions; + +[Action(Id = "ToggleTaskTrigger")] +[Group(Name = Groups.General, Order = 1)] +[Group(Name = Groups.Advanced, Order = 2, IsDefault = true)] +[Throws(ErrorCodes.TaskNotFound)] +[Throws(ErrorCodes.TaskTriggerNotFound)] +[Throws(ErrorCodes.Unknown)] +[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")] +public class ToggleTaskTriggerAction : ActionBase +{ + [InputArgument(Order = 6, Required = false)] + public string AccountDomain { get; set; } = null!; + + [InputArgument(Order = 3, Group = Groups.General)] + [DefaultValue(true)] + public bool Enabled { get; set; } + + [InputArgument(Order = 7, Required = false)] + public string Password { get; set; } = null!; + + [InputArgument(Order = 4, Required = false)] + public string TargetServer { get; set; } = null!; + + [InputArgument(Order = 1, Group = Groups.General)] + public string TaskName { get; set; } = null!; + + [InputArgument(Order = 2, Group = Groups.General)] + public string TriggerId { get; set; } = null!; + + [InputArgument(Order = 5, Required = false)] + public string UserName { get; set; } = null!; + + public override void Execute(ActionContext context) + { + Debugger.Launch(); + + try + { + using var taskService = new TaskService(TargetServer, UserName, AccountDomain, Password); + using var task = taskService.FindTask(TaskName); + if (task is null) + { + throw new TaskNotFoundException(TaskName); + } + + using var trigger = task.Definition.Triggers.FirstOrDefault(trigger => trigger.Id == TriggerId); + if (trigger is null) + { + throw new TaskTriggerNotFoundException(TaskName, TriggerId); + } + + trigger.Enabled = Enabled; + } + catch (TaskNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskNotFound, ex.Message, ex); + } + catch (TaskTriggerNotFoundException ex) + { + throw new ActionException(ErrorCodes.TaskTriggerNotFound, ex.Message, ex); + } + catch (Exception ex) + { + throw new ActionException(ErrorCodes.Unknown, ex.Message, ex); + } + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Enums/ActionType.cs b/modules/Modules.Windows.TaskScheduler.Actions/Enums/ActionType.cs new file mode 100644 index 0000000..d1d08b3 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Enums/ActionType.cs @@ -0,0 +1,13 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +public enum ActionType +{ + Execute = 0, + ComHandler = 5, + SendEmail = 6, + ShowMessage = 7 +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Enums/DayOfWeek.cs b/modules/Modules.Windows.TaskScheduler.Actions/Enums/DayOfWeek.cs new file mode 100644 index 0000000..075b54e --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Enums/DayOfWeek.cs @@ -0,0 +1,16 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +public enum DayOfWeek +{ + Sunday, + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Enums/MonthOfYear.cs b/modules/Modules.Windows.TaskScheduler.Actions/Enums/MonthOfYear.cs new file mode 100644 index 0000000..ddd0144 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Enums/MonthOfYear.cs @@ -0,0 +1,21 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +public enum MonthOfYear +{ + January, + February, + March, + April, + May, + June, + July, + August, + September, + October, + November, + December, +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Enums/SessionStateChangeType.cs b/modules/Modules.Windows.TaskScheduler.Actions/Enums/SessionStateChangeType.cs new file mode 100644 index 0000000..e76e297 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Enums/SessionStateChangeType.cs @@ -0,0 +1,15 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +public enum SessionStateChangeType +{ + ConsoleConnect, + ConsoleDisconnect, + RemoteConnect, + RemoteDisconnect, + SessionLock, + SessionUnlock +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Enums/TaskState.cs b/modules/Modules.Windows.TaskScheduler.Actions/Enums/TaskState.cs new file mode 100644 index 0000000..ac88a2a --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Enums/TaskState.cs @@ -0,0 +1,14 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +public enum TaskState +{ + Unknown, + Disabled, + Queued, + Ready, + Running +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Enums/TriggerType.cs b/modules/Modules.Windows.TaskScheduler.Actions/Enums/TriggerType.cs new file mode 100644 index 0000000..28cd1b0 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Enums/TriggerType.cs @@ -0,0 +1,20 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +public enum TriggerType +{ + Boot, + Daily, + Event, + Idle, + Logon, + MonthlyDayOfWeek, + Monthly, + Registration, + SessionStateChange, + Time, + Weekly +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Enums/WeekOfMonth.cs b/modules/Modules.Windows.TaskScheduler.Actions/Enums/WeekOfMonth.cs new file mode 100644 index 0000000..0c6d9e9 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Enums/WeekOfMonth.cs @@ -0,0 +1,14 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +public enum WeekOfMonth +{ + FirstWeek, + SecondWeek, + ThirdWeek, + FourthWeek, + LastWeek +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/ErrorCodes.cs b/modules/Modules.Windows.TaskScheduler.Actions/ErrorCodes.cs new file mode 100644 index 0000000..078b454 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/ErrorCodes.cs @@ -0,0 +1,16 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions; + +internal static class ErrorCodes +{ + public const string FolderNotFound = "FolderNotFoundError"; + public const string TaskActionNotFound = "TaskActionNotFoundError"; + public const string TaskActionUnknown = "TaskActionUnknownError"; + public const string TaskNotFound = "TaskNotFoundError"; + public const string TaskTriggerNotFound = "TaskTriggerNotFoundError"; + public const string TaskTriggerUnknown = "TaskTriggerUnknownError"; + public const string Unknown = "UnknownError"; +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/FolderNotFoundException.cs b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/FolderNotFoundException.cs new file mode 100644 index 0000000..ac17c53 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/FolderNotFoundException.cs @@ -0,0 +1,18 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +public class FolderNotFoundException : Exception +{ + public string FolderPath { get; } + + public FolderNotFoundException(string folderPath) + : base($"Could not find folder '{folderPath}'") + { + FolderPath = folderPath; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskActionException.cs b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskActionException.cs new file mode 100644 index 0000000..a19e529 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskActionException.cs @@ -0,0 +1,20 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +public class TaskActionException : Exception +{ + public string ActionId { get; } + public string TaskName { get; } + + public TaskActionException(string taskName, string actionId, string message) + : base(message) + { + TaskName = taskName; + ActionId = actionId; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskActionNotFoundException.cs b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskActionNotFoundException.cs new file mode 100644 index 0000000..e11951b --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskActionNotFoundException.cs @@ -0,0 +1,13 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +public class TaskActionNotFoundException : TaskActionException +{ + public TaskActionNotFoundException(string taskName, string actionId) + : base(taskName, actionId, $"Could not find action '{actionId}' in task '{taskName}'") + { + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskNotFoundException.cs b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskNotFoundException.cs new file mode 100644 index 0000000..16898d9 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskNotFoundException.cs @@ -0,0 +1,17 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +public sealed class TaskNotFoundException : Exception +{ + public string TaskName { get; } + + public TaskNotFoundException(string taskName) : base($"Could not find task '{taskName}'") + { + TaskName = taskName; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskTriggerException.cs b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskTriggerException.cs new file mode 100644 index 0000000..d082083 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskTriggerException.cs @@ -0,0 +1,20 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +public class TaskTriggerException : Exception +{ + public string TaskName { get; } + public string TriggerId { get; } + + public TaskTriggerException(string taskName, string triggerId, string message) + : base(message) + { + TaskName = taskName; + TriggerId = triggerId; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskTriggerNotFoundException.cs b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskTriggerNotFoundException.cs new file mode 100644 index 0000000..d3fd341 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Exceptions/TaskTriggerNotFoundException.cs @@ -0,0 +1,13 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Exceptions; + +public class TaskTriggerNotFoundException : TaskTriggerException +{ + public TaskTriggerNotFoundException(string taskName, string triggerId) + : base(taskName, triggerId, $"Could not find trigger '{triggerId}' in task '{taskName}'") + { + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/ActionTypeExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/ActionTypeExtensions.cs new file mode 100644 index 0000000..f540d43 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/ActionTypeExtensions.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class ActionTypeExtensions +{ + public static ActionType ToAction(this TaskActionType value) + { + return value switch + { + TaskActionType.Execute => ActionType.Execute, + TaskActionType.ComHandler => ActionType.ComHandler, + TaskActionType.SendEmail => ActionType.SendEmail, + TaskActionType.ShowMessage => ActionType.ShowMessage, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/DayOfWeekExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/DayOfWeekExtensions.cs new file mode 100644 index 0000000..fbd093e --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/DayOfWeekExtensions.cs @@ -0,0 +1,34 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Win32.TaskScheduler; +using DayOfWeek = PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums.DayOfWeek; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class DayOfWeekExtensions +{ + public static DaysOfTheWeek ToAbstraction(this IEnumerable values) + { + return values.Select(ToAbstraction).Aggregate(0, (current, val) => current | val); + } + + public static DaysOfTheWeek ToAbstraction(this DayOfWeek value) + { + return value switch + { + DayOfWeek.Sunday => DaysOfTheWeek.Sunday, + DayOfWeek.Monday => DaysOfTheWeek.Monday, + DayOfWeek.Tuesday => DaysOfTheWeek.Tuesday, + DayOfWeek.Wednesday => DaysOfTheWeek.Wednesday, + DayOfWeek.Thursday => DaysOfTheWeek.Thursday, + DayOfWeek.Friday => DaysOfTheWeek.Friday, + DayOfWeek.Saturday => DaysOfTheWeek.Saturday, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/MonthOfYearExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/MonthOfYearExtensions.cs new file mode 100644 index 0000000..ef35881 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/MonthOfYearExtensions.cs @@ -0,0 +1,39 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class MonthOfYearExtensions +{ + public static MonthsOfTheYear ToAbstraction(this IEnumerable values) + { + return values.Select(ToAbstraction).Aggregate(0, (current, val) => current | val); + } + + private static MonthsOfTheYear ToAbstraction(MonthOfYear value) + { + return value switch + { + MonthOfYear.January => MonthsOfTheYear.January, + MonthOfYear.February => MonthsOfTheYear.February, + MonthOfYear.March => MonthsOfTheYear.March, + MonthOfYear.April => MonthsOfTheYear.April, + MonthOfYear.May => MonthsOfTheYear.May, + MonthOfYear.June => MonthsOfTheYear.June, + MonthOfYear.July => MonthsOfTheYear.July, + MonthOfYear.August => MonthsOfTheYear.August, + MonthOfYear.September => MonthsOfTheYear.September, + MonthOfYear.October => MonthsOfTheYear.October, + MonthOfYear.November => MonthsOfTheYear.November, + MonthOfYear.December => MonthsOfTheYear.December, + _ => throw new ArgumentOutOfRangeException() + }; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/SessionStateChangeTypeExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/SessionStateChangeTypeExtensions.cs new file mode 100644 index 0000000..492f1c2 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/SessionStateChangeTypeExtensions.cs @@ -0,0 +1,26 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class SessionStateChangeTypeExtensions +{ + public static TaskSessionStateChangeType ToAbstraction(this SessionStateChangeType value) + { + return value switch + { + SessionStateChangeType.ConsoleConnect => TaskSessionStateChangeType.ConsoleConnect, + SessionStateChangeType.ConsoleDisconnect => TaskSessionStateChangeType.ConsoleDisconnect, + SessionStateChangeType.RemoteConnect => TaskSessionStateChangeType.RemoteConnect, + SessionStateChangeType.RemoteDisconnect => TaskSessionStateChangeType.RemoteDisconnect, + SessionStateChangeType.SessionLock => TaskSessionStateChangeType.SessionLock, + SessionStateChangeType.SessionUnlock => TaskSessionStateChangeType.SessionUnlock, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TaskExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TaskExtensions.cs new file mode 100644 index 0000000..e65af6a --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TaskExtensions.cs @@ -0,0 +1,45 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Types; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class TaskExtensions +{ + public static TaskActionObject ToAction(this Action value, string taskName) + { + return new TaskActionObject(taskName, value.Id, value.ActionType.ToAction()); + } + + public static TaskObject ToAction(this Task value) + { + return new TaskObject( + value.Name, + value.Path, + value.Enabled, + value.State.ToAction(), + value.ReadOnly, + value.LastRunTime, + value.LastTaskResult, + value.NextRunTime, + value.NumberOfMissedRuns); + } + + public static TaskTriggerObject ToAction(this Trigger value, string taskName) + { + return new TaskTriggerObject( + taskName, + value.Id, + value.TriggerType.ToAction(), + value.Enabled, + value.StartBoundary, + value.EndBoundary, + value.ExecutionTimeLimit, + value.Repetition.StopAtDurationEnd, + value.Repetition.Interval, + value.Repetition.Duration); + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TaskStateExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TaskStateExtensions.cs new file mode 100644 index 0000000..1ae3072 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TaskStateExtensions.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class TaskStateExtensions +{ + public static TaskState ToAction(this Microsoft.Win32.TaskScheduler.TaskState value) + { + return value switch + { + Microsoft.Win32.TaskScheduler.TaskState.Unknown => TaskState.Unknown, + Microsoft.Win32.TaskScheduler.TaskState.Disabled => TaskState.Disabled, + Microsoft.Win32.TaskScheduler.TaskState.Queued => TaskState.Queued, + Microsoft.Win32.TaskScheduler.TaskState.Ready => TaskState.Ready, + Microsoft.Win32.TaskScheduler.TaskState.Running => TaskState.Running, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TriggerTypeExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TriggerTypeExtensions.cs new file mode 100644 index 0000000..0b3a2df --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/TriggerTypeExtensions.cs @@ -0,0 +1,32 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class TriggerTypeExtensions +{ + public static TriggerType ToAction(this TaskTriggerType value) + { + return value switch + { + TaskTriggerType.Event => TriggerType.Event, + TaskTriggerType.Time => TriggerType.Time, + TaskTriggerType.Daily => TriggerType.Daily, + TaskTriggerType.Weekly => TriggerType.Weekly, + TaskTriggerType.Monthly => TriggerType.Monthly, + TaskTriggerType.MonthlyDOW => TriggerType.MonthlyDayOfWeek, + TaskTriggerType.Idle => TriggerType.Idle, + TaskTriggerType.Registration => TriggerType.Registration, + TaskTriggerType.Boot => TriggerType.Boot, + TaskTriggerType.Logon => TriggerType.Logon, + TaskTriggerType.SessionStateChange => TriggerType.SessionStateChange, + TaskTriggerType.Custom => throw new NotSupportedException($"Task trigger type '{value}' is not supported"), + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Extensions/WeekOfMonthExtensions.cs b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/WeekOfMonthExtensions.cs new file mode 100644 index 0000000..235aaff --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Extensions/WeekOfMonthExtensions.cs @@ -0,0 +1,32 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Win32.TaskScheduler; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Extensions; + +internal static class WeekOfMonthExtensions +{ + public static WhichWeek ToAbstraction(this IEnumerable values) + { + return values.Select(ToAbstraction).Aggregate(0, (current, val) => current | val); + } + + public static WhichWeek ToAbstraction(this WeekOfMonth value) + { + return value switch + { + WeekOfMonth.FirstWeek => WhichWeek.FirstWeek, + WeekOfMonth.SecondWeek => WhichWeek.SecondWeek, + WeekOfMonth.ThirdWeek => WhichWeek.ThirdWeek, + WeekOfMonth.FourthWeek => WhichWeek.FourthWeek, + WeekOfMonth.LastWeek => WhichWeek.LastWeek, + _ => throw new ArgumentOutOfRangeException(nameof(value), value, null) + }; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Groups.cs b/modules/Modules.Windows.TaskScheduler.Actions/Groups.cs new file mode 100644 index 0000000..f73ea5a --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Groups.cs @@ -0,0 +1,11 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions; + +internal static class Groups +{ + public const string General = "General"; + public const string Advanced = "Advanced"; +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Modules.Windows.TaskScheduler.Actions.csproj b/modules/Modules.Windows.TaskScheduler.Actions/Modules.Windows.TaskScheduler.Actions.csproj new file mode 100644 index 0000000..4388c2b --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Modules.Windows.TaskScheduler.Actions.csproj @@ -0,0 +1,39 @@ + + + + WindowsTaskScheduler + net472 + latest + enable + true + + + + + + + + + + + True + True + Resources.resx + + + True + True + Resources.resx + + + + + + PublicResXFileCodeGenerator + Resources.Designer.cs + + + + + + diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Properties/Resources.Designer.cs b/modules/Modules.Windows.TaskScheduler.Actions/Properties/Resources.Designer.cs new file mode 100644 index 0000000..e3859f4 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Properties/Resources.Designer.cs @@ -0,0 +1,3509 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task at startup.. + /// + public static string Boot_Summary { + get { + return ResourceManager.GetString("Boot_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string CreateTask_AccountDomain_Description { + get { + return ResourceManager.GetString("CreateTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string CreateTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("CreateTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creates a task with the specified name.. + /// + public static string CreateTask_Description { + get { + return ResourceManager.GetString("CreateTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create task. + /// + public static string CreateTask_FriendlyName { + get { + return ResourceManager.GetString("CreateTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string CreateTask_Password_Description { + get { + return ResourceManager.GetString("CreateTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string CreateTask_Password_FriendlyName { + get { + return ResourceManager.GetString("CreateTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create task.. + /// + public static string CreateTask_Summary { + get { + return ResourceManager.GetString("CreateTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string CreateTask_TargetServer_Description { + get { + return ResourceManager.GetString("CreateTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string CreateTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("CreateTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string CreateTask_TaskName_Description { + get { + return ResourceManager.GetString("CreateTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string CreateTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("CreateTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string CreateTask_UserName_Description { + get { + return ResourceManager.GetString("CreateTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string CreateTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("CreateTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string CreateTaskAction_AccountDomain_Description { + get { + return ResourceManager.GetString("CreateTaskAction_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string CreateTaskAction_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The arguments associated with the command-line operation.. + /// + public static string CreateTaskAction_Arguments_Description { + get { + return ResourceManager.GetString("CreateTaskAction_Arguments_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Arguments. + /// + public static string CreateTaskAction_Arguments_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_Arguments_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creates an action in the task with the specified name.. + /// + public static string CreateTaskAction_Description { + get { + return ResourceManager.GetString("CreateTaskAction_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create action in task. + /// + public static string CreateTaskAction_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string CreateTaskAction_Password_Description { + get { + return ResourceManager.GetString("CreateTaskAction_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string CreateTaskAction_Password_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The path to an executable file.. + /// + public static string CreateTaskAction_Path_Description { + get { + return ResourceManager.GetString("CreateTaskAction_Path_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path. + /// + public static string CreateTaskAction_Path_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_Path_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create action in task.. + /// + public static string CreateTaskAction_Summary { + get { + return ResourceManager.GetString("CreateTaskAction_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string CreateTaskAction_TargetServer_Description { + get { + return ResourceManager.GetString("CreateTaskAction_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string CreateTaskAction_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string CreateTaskAction_TaskName_Description { + get { + return ResourceManager.GetString("CreateTaskAction_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string CreateTaskAction_TaskName_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string CreateTaskAction_UserName_Description { + get { + return ResourceManager.GetString("CreateTaskAction_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string CreateTaskAction_UserName_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The directory that contains either the executable file or the files that are used by the executable file.. + /// + public static string CreateTaskAction_WorkingDirectory_Description { + get { + return ResourceManager.GetString("CreateTaskAction_WorkingDirectory_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Working Directory. + /// + public static string CreateTaskAction_WorkingDirectory_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskAction_WorkingDirectory_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string CreateTaskTrigger_AccountDomain_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string CreateTaskTrigger_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The interval between days.. + /// + public static string CreateTaskTrigger_DaysInterval_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_DaysInterval_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Days Interval. + /// + public static string CreateTaskTrigger_DaysInterval_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_DaysInterval_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The days of the month.. + /// + public static string CreateTaskTrigger_DaysOfMonth_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_DaysOfMonth_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Days Of Month. + /// + public static string CreateTaskTrigger_DaysOfMonth_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_DaysOfMonth_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The days of the week.. + /// + public static string CreateTaskTrigger_DaysOfWeek_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_DaysOfWeek_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Days Of Week. + /// + public static string CreateTaskTrigger_DaysOfWeek_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_DaysOfWeek_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The amount of time between when the trigger is fired and when the task is executed.. + /// + public static string CreateTaskTrigger_Delay_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Delay_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delay. + /// + public static string CreateTaskTrigger_Delay_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_Delay_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creates a trigger for the task with the specified name.. + /// + public static string CreateTaskTrigger_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Whether the trigger is enabled.. + /// + public static string CreateTaskTrigger_Enabled_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Enabled_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enabled. + /// + public static string CreateTaskTrigger_Enabled_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_Enabled_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The date and time when the trigger is deactivated. The trigger can't start the task after it is deactivated.. + /// + public static string CreateTaskTrigger_EndBoundary_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_EndBoundary_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Expires On. + /// + public static string CreateTaskTrigger_EndBoundary_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_EndBoundary_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create trigger for task. + /// + public static string CreateTaskTrigger_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identifier of the trigger.. + /// + public static string CreateTaskTrigger_Id_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Id_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ID. + /// + public static string CreateTaskTrigger_Id_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_Id_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The months of the year.. + /// + public static string CreateTaskTrigger_MonthsOfYear_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_MonthsOfYear_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Months Of Year. + /// + public static string CreateTaskTrigger_MonthsOfYear_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_MonthsOfYear_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string CreateTaskTrigger_Password_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string CreateTaskTrigger_Password_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The delay time that is randomly added to the start time of the trigger.. + /// + public static string CreateTaskTrigger_RandomDelay_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_RandomDelay_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Random Delay. + /// + public static string CreateTaskTrigger_RandomDelay_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_RandomDelay_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The duration that the pattern is repeated. The minimum time allowed is one minute. If zero is specified, the pattern is repeated indefinitely.. + /// + public static string CreateTaskTrigger_RepetitionDuration_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_RepetitionDuration_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Duration. + /// + public static string CreateTaskTrigger_RepetitionDuration_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_RepetitionDuration_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The amount of time in days between each restart of the task. The value must be between 1 minute and 31 days.. + /// + public static string CreateTaskTrigger_RepetitionInterval_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_RepetitionInterval_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Interval. + /// + public static string CreateTaskTrigger_RepetitionInterval_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_RepetitionInterval_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Whether a running instance of the task is stopped at the end of repetition pattern duration.. + /// + public static string CreateTaskTrigger_RepetitionStopAtDurationEnd_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_RepetitionStopAtDurationEnd_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop At End of Repetition Duration. + /// + public static string CreateTaskTrigger_RepetitionStopAtDurationEnd_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_RepetitionStopAtDurationEnd_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Whether the task runs on the last day of the month.. + /// + public static string CreateTaskTrigger_RunOnLastDayOfMonth_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_RunOnLastDayOfMonth_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run On Last Day Of Month. + /// + public static string CreateTaskTrigger_RunOnLastDayOfMonth_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_RunOnLastDayOfMonth_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The date and time when the trigger is activated.. + /// + public static string CreateTaskTrigger_StartBoundary_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_StartBoundary_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string CreateTaskTrigger_StartBoundary_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_StartBoundary_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The kind of Terminal Server session change that will trigger the task launch.. + /// + public static string CreateTaskTrigger_State_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_State_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to State. + /// + public static string CreateTaskTrigger_State_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_State_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The XPath query string that identifies the event that fires the trigger.. + /// + public static string CreateTaskTrigger_Subscription_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Subscription_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription. + /// + public static string CreateTaskTrigger_Subscription_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_Subscription_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create trigger for task.. + /// + public static string CreateTaskTrigger_Summary { + get { + return ResourceManager.GetString("CreateTaskTrigger_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string CreateTaskTrigger_TargetServer_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string CreateTaskTrigger_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string CreateTaskTrigger_TaskName_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string CreateTaskTrigger_TaskName_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The maximum amount of time that the task launched by this trigger is allowed to run.. + /// + public static string CreateTaskTrigger_Timeout_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Timeout_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timeout. + /// + public static string CreateTaskTrigger_Timeout_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_Timeout_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of trigger.. + /// + public static string CreateTaskTrigger_Type_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_Type_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type. + /// + public static string CreateTaskTrigger_Type_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_Type_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator".. + /// + public static string CreateTaskTrigger_UserId_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_UserId_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User ID. + /// + public static string CreateTaskTrigger_UserId_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_UserId_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string CreateTaskTrigger_UserName_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string CreateTaskTrigger_UserName_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query.. + /// + public static string CreateTaskTrigger_ValueQueries_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_ValueQueries_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value Queries. + /// + public static string CreateTaskTrigger_ValueQueries_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_ValueQueries_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The interval between weeks.. + /// + public static string CreateTaskTrigger_WeeksInterval_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_WeeksInterval_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Weeks Interval. + /// + public static string CreateTaskTrigger_WeeksInterval_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_WeeksInterval_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The weeks of the month.. + /// + public static string CreateTaskTrigger_WeeksOfMonth_Description { + get { + return ResourceManager.GetString("CreateTaskTrigger_WeeksOfMonth_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Weeks Of Month. + /// + public static string CreateTaskTrigger_WeeksOfMonth_FriendlyName { + get { + return ResourceManager.GetString("CreateTaskTrigger_WeeksOfMonth_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task on a daily schedule.. + /// + public static string Daily_Summary { + get { + return ResourceManager.GetString("Daily_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string DeleteTask_AccountDomain_Description { + get { + return ResourceManager.GetString("DeleteTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string DeleteTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("DeleteTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deletes a task with the specified name.. + /// + public static string DeleteTask_Description { + get { + return ResourceManager.GetString("DeleteTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete task. + /// + public static string DeleteTask_FriendlyName { + get { + return ResourceManager.GetString("DeleteTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string DeleteTask_Password_Description { + get { + return ResourceManager.GetString("DeleteTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string DeleteTask_Password_FriendlyName { + get { + return ResourceManager.GetString("DeleteTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete task.. + /// + public static string DeleteTask_Summary { + get { + return ResourceManager.GetString("DeleteTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string DeleteTask_TargetServer_Description { + get { + return ResourceManager.GetString("DeleteTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string DeleteTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("DeleteTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string DeleteTask_TaskName_Description { + get { + return ResourceManager.GetString("DeleteTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string DeleteTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("DeleteTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string DeleteTask_UserName_Description { + get { + return ResourceManager.GetString("DeleteTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string DeleteTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("DeleteTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string DeleteTaskAction_AccountDomain_Description { + get { + return ResourceManager.GetString("DeleteTaskAction_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string DeleteTaskAction_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskAction_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identifier of the action.. + /// + public static string DeleteTaskAction_ActionId_Description { + get { + return ResourceManager.GetString("DeleteTaskAction_ActionId_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Action ID. + /// + public static string DeleteTaskAction_ActionId_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskAction_ActionId_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deletes a action of the task with the specified name.. + /// + public static string DeleteTaskAction_Description { + get { + return ResourceManager.GetString("DeleteTaskAction_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete action of task. + /// + public static string DeleteTaskAction_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskAction_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string DeleteTaskAction_Password_Description { + get { + return ResourceManager.GetString("DeleteTaskAction_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string DeleteTaskAction_Password_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskAction_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete action of task.. + /// + public static string DeleteTaskAction_Summary { + get { + return ResourceManager.GetString("DeleteTaskAction_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string DeleteTaskAction_TargetServer_Description { + get { + return ResourceManager.GetString("DeleteTaskAction_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string DeleteTaskAction_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskAction_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string DeleteTaskAction_TaskName_Description { + get { + return ResourceManager.GetString("DeleteTaskAction_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string DeleteTaskAction_TaskName_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskAction_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string DeleteTaskAction_UserName_Description { + get { + return ResourceManager.GetString("DeleteTaskAction_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string DeleteTaskAction_UserName_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskAction_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string DeleteTaskTrigger_AccountDomain_Description { + get { + return ResourceManager.GetString("DeleteTaskTrigger_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string DeleteTaskTrigger_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskTrigger_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deletes a trigger for the task with the specified name.. + /// + public static string DeleteTaskTrigger_Description { + get { + return ResourceManager.GetString("DeleteTaskTrigger_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete trigger for task. + /// + public static string DeleteTaskTrigger_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskTrigger_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string DeleteTaskTrigger_Password_Description { + get { + return ResourceManager.GetString("DeleteTaskTrigger_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string DeleteTaskTrigger_Password_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskTrigger_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete trigger for task.. + /// + public static string DeleteTaskTrigger_Summary { + get { + return ResourceManager.GetString("DeleteTaskTrigger_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string DeleteTaskTrigger_TargetServer_Description { + get { + return ResourceManager.GetString("DeleteTaskTrigger_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string DeleteTaskTrigger_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskTrigger_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string DeleteTaskTrigger_TaskName_Description { + get { + return ResourceManager.GetString("DeleteTaskTrigger_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string DeleteTaskTrigger_TaskName_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskTrigger_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identifier of the trigger.. + /// + public static string DeleteTaskTrigger_TriggerId_Description { + get { + return ResourceManager.GetString("DeleteTaskTrigger_TriggerId_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Trigger ID. + /// + public static string DeleteTaskTrigger_TriggerId_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskTrigger_TriggerId_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string DeleteTaskTrigger_UserName_Description { + get { + return ResourceManager.GetString("DeleteTaskTrigger_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string DeleteTaskTrigger_UserName_FriendlyName { + get { + return ResourceManager.GetString("DeleteTaskTrigger_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates that the folder was not found.. + /// + public static string Error_FolderNotFoundError_Description { + get { + return ResourceManager.GetString("Error_FolderNotFoundError_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Folder not found. + /// + public static string Error_FolderNotFoundError_FriendlyName { + get { + return ResourceManager.GetString("Error_FolderNotFoundError_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates that the action was not found.. + /// + public static string Error_TaskActionNotFoundError_Description { + get { + return ResourceManager.GetString("Error_TaskActionNotFoundError_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Action not found. + /// + public static string Error_TaskActionNotFoundError_FriendlyName { + get { + return ResourceManager.GetString("Error_TaskActionNotFoundError_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates that there was a problem when executing the action operation.. + /// + public static string Error_TaskActionUnknownError_Description { + get { + return ResourceManager.GetString("Error_TaskActionUnknownError_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Action operation failed. + /// + public static string Error_TaskActionUnknownError_FriendlyName { + get { + return ResourceManager.GetString("Error_TaskActionUnknownError_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates that the task was not found.. + /// + public static string Error_TaskNotFoundError_Description { + get { + return ResourceManager.GetString("Error_TaskNotFoundError_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task not found. + /// + public static string Error_TaskNotFoundError_FriendlyName { + get { + return ResourceManager.GetString("Error_TaskNotFoundError_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates that the trigger was not found.. + /// + public static string Error_TaskTriggerNotFoundError_Description { + get { + return ResourceManager.GetString("Error_TaskTriggerNotFoundError_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Trigger not found. + /// + public static string Error_TaskTriggerNotFoundError_FriendlyName { + get { + return ResourceManager.GetString("Error_TaskTriggerNotFoundError_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates that there was a problem when executing the trigger operation.. + /// + public static string Error_TaskTriggerUnknownError_Description { + get { + return ResourceManager.GetString("Error_TaskTriggerUnknownError_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Trigger operation failed. + /// + public static string Error_TaskTriggerUnknownError_FriendlyName { + get { + return ResourceManager.GetString("Error_TaskTriggerUnknownError_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indicates that there was a problem when executing the operation.. + /// + public static string Error_UnknownError_Description { + get { + return ResourceManager.GetString("Error_UnknownError_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation failed. + /// + public static string Error_UnknownError_FriendlyName { + get { + return ResourceManager.GetString("Error_UnknownError_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task on an event.. + /// + public static string Event_Summary { + get { + return ResourceManager.GetString("Event_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string ExportTask_AccountDomain_Description { + get { + return ResourceManager.GetString("ExportTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string ExportTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("ExportTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exports the task with the specified name.. + /// + public static string ExportTask_Description { + get { + return ResourceManager.GetString("ExportTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The path to the file.. + /// + public static string ExportTask_FileName_Description { + get { + return ResourceManager.GetString("ExportTask_FileName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File Name. + /// + public static string ExportTask_FileName_FriendlyName { + get { + return ResourceManager.GetString("ExportTask_FileName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Export task. + /// + public static string ExportTask_FriendlyName { + get { + return ResourceManager.GetString("ExportTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string ExportTask_Password_Description { + get { + return ResourceManager.GetString("ExportTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string ExportTask_Password_FriendlyName { + get { + return ResourceManager.GetString("ExportTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Export the task.. + /// + public static string ExportTask_Summary { + get { + return ResourceManager.GetString("ExportTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string ExportTask_TargetServer_Description { + get { + return ResourceManager.GetString("ExportTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string ExportTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("ExportTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string ExportTask_TaskName_Description { + get { + return ResourceManager.GetString("ExportTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string ExportTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("ExportTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string ExportTask_UserName_Description { + get { + return ResourceManager.GetString("ExportTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string ExportTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("ExportTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string GetFolderTasks_AccountDomain_Description { + get { + return ResourceManager.GetString("GetFolderTasks_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string GetFolderTasks_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Gets the list of tasks in the specified folder.. + /// + public static string GetFolderTasks_Description { + get { + return ResourceManager.GetString("GetFolderTasks_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The regular expression to use as name filter.. + /// + public static string GetFolderTasks_Filter_Description { + get { + return ResourceManager.GetString("GetFolderTasks_Filter_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter. + /// + public static string GetFolderTasks_Filter_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_Filter_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The path to the folder containing the tasks.. + /// + public static string GetFolderTasks_FolderPath_Description { + get { + return ResourceManager.GetString("GetFolderTasks_FolderPath_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Folder. + /// + public static string GetFolderTasks_FolderPath_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_FolderPath_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get tasks in folder. + /// + public static string GetFolderTasks_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string GetFolderTasks_Password_Description { + get { + return ResourceManager.GetString("GetFolderTasks_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string GetFolderTasks_Password_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get tasks in folder.. + /// + public static string GetFolderTasks_Summary { + get { + return ResourceManager.GetString("GetFolderTasks_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string GetFolderTasks_TargetServer_Description { + get { + return ResourceManager.GetString("GetFolderTasks_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string GetFolderTasks_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The names of the tasks in the folder.. + /// + public static string GetFolderTasks_TaskNames_Description { + get { + return ResourceManager.GetString("GetFolderTasks_TaskNames_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Names. + /// + public static string GetFolderTasks_TaskNames_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_TaskNames_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string GetFolderTasks_UserName_Description { + get { + return ResourceManager.GetString("GetFolderTasks_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string GetFolderTasks_UserName_FriendlyName { + get { + return ResourceManager.GetString("GetFolderTasks_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string GetTask_AccountDomain_Description { + get { + return ResourceManager.GetString("GetTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string GetTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("GetTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Gets the task with the specified name.. + /// + public static string GetTask_Description { + get { + return ResourceManager.GetString("GetTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string GetTask_FileName_Description { + get { + return ResourceManager.GetString("GetTask_FileName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File Name. + /// + public static string GetTask_FileName_FriendlyName { + get { + return ResourceManager.GetString("GetTask_FileName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get task. + /// + public static string GetTask_FriendlyName { + get { + return ResourceManager.GetString("GetTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string GetTask_Password_Description { + get { + return ResourceManager.GetString("GetTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string GetTask_Password_FriendlyName { + get { + return ResourceManager.GetString("GetTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get the task.. + /// + public static string GetTask_Summary { + get { + return ResourceManager.GetString("GetTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string GetTask_TargetServer_Description { + get { + return ResourceManager.GetString("GetTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string GetTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("GetTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task.. + /// + public static string GetTask_Task_Description { + get { + return ResourceManager.GetString("GetTask_Task_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task. + /// + public static string GetTask_Task_FriendlyName { + get { + return ResourceManager.GetString("GetTask_Task_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string GetTask_TaskName_Description { + get { + return ResourceManager.GetString("GetTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string GetTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("GetTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string GetTask_UserName_Description { + get { + return ResourceManager.GetString("GetTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string GetTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("GetTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string GetTaskAction_AccountDomain_Description { + get { + return ResourceManager.GetString("GetTaskAction_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string GetTaskAction_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identifier of the action.. + /// + public static string GetTaskAction_ActionId_Description { + get { + return ResourceManager.GetString("GetTaskAction_ActionId_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Action ID. + /// + public static string GetTaskAction_ActionId_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_ActionId_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Gets the action of the task with the specified name.. + /// + public static string GetTaskAction_Description { + get { + return ResourceManager.GetString("GetTaskAction_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get task action. + /// + public static string GetTaskAction_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string GetTaskAction_Password_Description { + get { + return ResourceManager.GetString("GetTaskAction_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string GetTaskAction_Password_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get task action.. + /// + public static string GetTaskAction_Summary { + get { + return ResourceManager.GetString("GetTaskAction_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string GetTaskAction_TargetServer_Description { + get { + return ResourceManager.GetString("GetTaskAction_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string GetTaskAction_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task action.. + /// + public static string GetTaskAction_TaskAction_Description { + get { + return ResourceManager.GetString("GetTaskAction_TaskAction_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Action. + /// + public static string GetTaskAction_TaskAction_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_TaskAction_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string GetTaskAction_TaskName_Description { + get { + return ResourceManager.GetString("GetTaskAction_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string GetTaskAction_TaskName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string GetTaskAction_UserName_Description { + get { + return ResourceManager.GetString("GetTaskAction_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string GetTaskAction_UserName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskAction_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string GetTaskActions_AccountDomain_Description { + get { + return ResourceManager.GetString("GetTaskActions_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string GetTaskActions_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("GetTaskActions_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The actions of the task.. + /// + public static string GetTaskActions_Actions_Description { + get { + return ResourceManager.GetString("GetTaskActions_Actions_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Actions. + /// + public static string GetTaskActions_Actions_FriendlyName { + get { + return ResourceManager.GetString("GetTaskActions_Actions_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Gets the list of actions in the specified task.. + /// + public static string GetTaskActions_Description { + get { + return ResourceManager.GetString("GetTaskActions_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get actions in task. + /// + public static string GetTaskActions_FriendlyName { + get { + return ResourceManager.GetString("GetTaskActions_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string GetTaskActions_Password_Description { + get { + return ResourceManager.GetString("GetTaskActions_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string GetTaskActions_Password_FriendlyName { + get { + return ResourceManager.GetString("GetTaskActions_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get actions in task.. + /// + public static string GetTaskActions_Summary { + get { + return ResourceManager.GetString("GetTaskActions_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string GetTaskActions_TargetServer_Description { + get { + return ResourceManager.GetString("GetTaskActions_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string GetTaskActions_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("GetTaskActions_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string GetTaskActions_TaskName_Description { + get { + return ResourceManager.GetString("GetTaskActions_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string GetTaskActions_TaskName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskActions_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string GetTaskActions_UserName_Description { + get { + return ResourceManager.GetString("GetTaskActions_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string GetTaskActions_UserName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskActions_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string GetTaskTrigger_AccountDomain_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string GetTaskTrigger_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Gets the trigger of the task with the specified name.. + /// + public static string GetTaskTrigger_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get task trigger. + /// + public static string GetTaskTrigger_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string GetTaskTrigger_Password_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string GetTaskTrigger_Password_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get task trigger.. + /// + public static string GetTaskTrigger_Summary { + get { + return ResourceManager.GetString("GetTaskTrigger_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string GetTaskTrigger_TargetServer_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string GetTaskTrigger_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string GetTaskTrigger_TaskName_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string GetTaskTrigger_TaskName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The task trigger.. + /// + public static string GetTaskTrigger_TaskTrigger_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_TaskTrigger_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Trigger. + /// + public static string GetTaskTrigger_TaskTrigger_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_TaskTrigger_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identifier of the trigger.. + /// + public static string GetTaskTrigger_TriggerId_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_TriggerId_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Trigger ID. + /// + public static string GetTaskTrigger_TriggerId_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_TriggerId_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string GetTaskTrigger_UserName_Description { + get { + return ResourceManager.GetString("GetTaskTrigger_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string GetTaskTrigger_UserName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTrigger_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string GetTaskTriggers_AccountDomain_Description { + get { + return ResourceManager.GetString("GetTaskTriggers_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string GetTaskTriggers_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTriggers_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Gets the list of triggers for a task with the specified name.. + /// + public static string GetTaskTriggers_Description { + get { + return ResourceManager.GetString("GetTaskTriggers_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get triggers for task. + /// + public static string GetTaskTriggers_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTriggers_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string GetTaskTriggers_Password_Description { + get { + return ResourceManager.GetString("GetTaskTriggers_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string GetTaskTriggers_Password_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTriggers_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Get triggers for task.. + /// + public static string GetTaskTriggers_Summary { + get { + return ResourceManager.GetString("GetTaskTriggers_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string GetTaskTriggers_TargetServer_Description { + get { + return ResourceManager.GetString("GetTaskTriggers_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string GetTaskTriggers_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTriggers_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string GetTaskTriggers_TaskName_Description { + get { + return ResourceManager.GetString("GetTaskTriggers_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string GetTaskTriggers_TaskName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTriggers_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The triggers for the task.. + /// + public static string GetTaskTriggers_Triggers_Description { + get { + return ResourceManager.GetString("GetTaskTriggers_Triggers_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggers. + /// + public static string GetTaskTriggers_Triggers_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTriggers_Triggers_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string GetTaskTriggers_UserName_Description { + get { + return ResourceManager.GetString("GetTaskTriggers_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string GetTaskTriggers_UserName_FriendlyName { + get { + return ResourceManager.GetString("GetTaskTriggers_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The advanced settings.. + /// + public static string Group_Advanced_Description { + get { + return ResourceManager.GetString("Group_Advanced_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Advanced. + /// + public static string Group_Advanced_FriendlyName { + get { + return ResourceManager.GetString("Group_Advanced_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The general settings.. + /// + public static string Group_General_Description { + get { + return ResourceManager.GetString("Group_General_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to General. + /// + public static string Group_General_FriendlyName { + get { + return ResourceManager.GetString("Group_General_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task on idle.. + /// + public static string Idle_Summary { + get { + return ResourceManager.GetString("Idle_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string ImportTask_AccountDomain_Description { + get { + return ResourceManager.GetString("ImportTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string ImportTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("ImportTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Imports the task with the specified name.. + /// + public static string ImportTask_Description { + get { + return ResourceManager.GetString("ImportTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The path to the file.. + /// + public static string ImportTask_FileName_Description { + get { + return ResourceManager.GetString("ImportTask_FileName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File Name. + /// + public static string ImportTask_FileName_FriendlyName { + get { + return ResourceManager.GetString("ImportTask_FileName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Import task. + /// + public static string ImportTask_FriendlyName { + get { + return ResourceManager.GetString("ImportTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string ImportTask_Password_Description { + get { + return ResourceManager.GetString("ImportTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string ImportTask_Password_FriendlyName { + get { + return ResourceManager.GetString("ImportTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Import the task.. + /// + public static string ImportTask_Summary { + get { + return ResourceManager.GetString("ImportTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string ImportTask_TargetServer_Description { + get { + return ResourceManager.GetString("ImportTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string ImportTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("ImportTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string ImportTask_TaskName_Description { + get { + return ResourceManager.GetString("ImportTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string ImportTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("ImportTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string ImportTask_UserName_Description { + get { + return ResourceManager.GetString("ImportTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string ImportTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("ImportTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task at log on.. + /// + public static string Logon_Summary { + get { + return ResourceManager.GetString("Logon_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task on a monthly schedule.. + /// + public static string Monthly_Summary { + get { + return ResourceManager.GetString("Monthly_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task on a monthly schedule at a day of the week.. + /// + public static string MonthlyDayOfWeek_Summary { + get { + return ResourceManager.GetString("MonthlyDayOfWeek_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task at task creation/modification.. + /// + public static string Registration_Summary { + get { + return ResourceManager.GetString("Registration_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task on session state change.. + /// + public static string SessionStateChange_Summary { + get { + return ResourceManager.GetString("SessionStateChange_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When connected to the user session from local computer.. + /// + public static string SessionStateChangeType_ConsoleConnect_Description { + get { + return ResourceManager.GetString("SessionStateChangeType_ConsoleConnect_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On connected from user session from local computer. + /// + public static string SessionStateChangeType_ConsoleConnect_FriendlyName { + get { + return ResourceManager.GetString("SessionStateChangeType_ConsoleConnect_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When disconnected from the user session from local computer.. + /// + public static string SessionStateChangeType_ConsoleDisconnect_Description { + get { + return ResourceManager.GetString("SessionStateChangeType_ConsoleDisconnect_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On disconnected from user session from local computer. + /// + public static string SessionStateChangeType_ConsoleDisconnect_FriendlyName { + get { + return ResourceManager.GetString("SessionStateChangeType_ConsoleDisconnect_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When connected to the user session from remote computer.. + /// + public static string SessionStateChangeType_RemoteConnect_Description { + get { + return ResourceManager.GetString("SessionStateChangeType_RemoteConnect_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On connected from user session from remote computer. + /// + public static string SessionStateChangeType_RemoteConnect_FriendlyName { + get { + return ResourceManager.GetString("SessionStateChangeType_RemoteConnect_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When disconnected from the user session from remote computer.. + /// + public static string SessionStateChangeType_RemoteDisconnect_Description { + get { + return ResourceManager.GetString("SessionStateChangeType_RemoteDisconnect_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On disconnected from user session from remote computer. + /// + public static string SessionStateChangeType_RemoteDisconnect_FriendlyName { + get { + return ResourceManager.GetString("SessionStateChangeType_RemoteDisconnect_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When the workstation is locked.. + /// + public static string SessionStateChangeType_SessionLock_Description { + get { + return ResourceManager.GetString("SessionStateChangeType_SessionLock_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On workstation locked. + /// + public static string SessionStateChangeType_SessionLock_FriendlyName { + get { + return ResourceManager.GetString("SessionStateChangeType_SessionLock_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When the workstation is unlocked.. + /// + public static string SessionStateChangeType_SessionUnlock_Description { + get { + return ResourceManager.GetString("SessionStateChangeType_SessionUnlock_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On workstation unlocked. + /// + public static string SessionStateChangeType_SessionUnlock_FriendlyName { + get { + return ResourceManager.GetString("SessionStateChangeType_SessionUnlock_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string StartTask_AccountDomain_Description { + get { + return ResourceManager.GetString("StartTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string StartTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("StartTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starts the task with the specified name.. + /// + public static string StartTask_Description { + get { + return ResourceManager.GetString("StartTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start task. + /// + public static string StartTask_FriendlyName { + get { + return ResourceManager.GetString("StartTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string StartTask_Password_Description { + get { + return ResourceManager.GetString("StartTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string StartTask_Password_FriendlyName { + get { + return ResourceManager.GetString("StartTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start the task.. + /// + public static string StartTask_Summary { + get { + return ResourceManager.GetString("StartTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string StartTask_TargetServer_Description { + get { + return ResourceManager.GetString("StartTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string StartTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("StartTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string StartTask_TaskName_Description { + get { + return ResourceManager.GetString("StartTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string StartTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("StartTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string StartTask_UserName_Description { + get { + return ResourceManager.GetString("StartTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string StartTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("StartTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string StopTask_AccountDomain_Description { + get { + return ResourceManager.GetString("StopTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string StopTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("StopTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stops the task with the specified name.. + /// + public static string StopTask_Description { + get { + return ResourceManager.GetString("StopTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop task. + /// + public static string StopTask_FriendlyName { + get { + return ResourceManager.GetString("StopTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string StopTask_Password_Description { + get { + return ResourceManager.GetString("StopTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string StopTask_Password_FriendlyName { + get { + return ResourceManager.GetString("StopTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop the task.. + /// + public static string StopTask_Summary { + get { + return ResourceManager.GetString("StopTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string StopTask_TargetServer_Description { + get { + return ResourceManager.GetString("StopTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string StopTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("StopTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string StopTask_TaskName_Description { + get { + return ResourceManager.GetString("StopTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string StopTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("StopTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string StopTask_UserName_Description { + get { + return ResourceManager.GetString("StopTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string StopTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("StopTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task one time.. + /// + public static string Time_Summary { + get { + return ResourceManager.GetString("Time_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string ToggleTask_AccountDomain_Description { + get { + return ResourceManager.GetString("ToggleTask_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string ToggleTask_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("ToggleTask_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enables or disables the task with the specified name.. + /// + public static string ToggleTask_Description { + get { + return ResourceManager.GetString("ToggleTask_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Whether the task is enabled.. + /// + public static string ToggleTask_Enabled_Description { + get { + return ResourceManager.GetString("ToggleTask_Enabled_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enabled. + /// + public static string ToggleTask_Enabled_FriendlyName { + get { + return ResourceManager.GetString("ToggleTask_Enabled_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable/disable task. + /// + public static string ToggleTask_FriendlyName { + get { + return ResourceManager.GetString("ToggleTask_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string ToggleTask_Password_Description { + get { + return ResourceManager.GetString("ToggleTask_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string ToggleTask_Password_FriendlyName { + get { + return ResourceManager.GetString("ToggleTask_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <if(ENABLED)>Enables<endif>Disables<endif> the task.. + /// + public static string ToggleTask_Summary { + get { + return ResourceManager.GetString("ToggleTask_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string ToggleTask_TargetServer_Description { + get { + return ResourceManager.GetString("ToggleTask_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string ToggleTask_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("ToggleTask_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string ToggleTask_TaskName_Description { + get { + return ResourceManager.GetString("ToggleTask_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string ToggleTask_TaskName_FriendlyName { + get { + return ResourceManager.GetString("ToggleTask_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string ToggleTask_UserName_Description { + get { + return ResourceManager.GetString("ToggleTask_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string ToggleTask_UserName_FriendlyName { + get { + return ResourceManager.GetString("ToggleTask_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The domain of the account.. + /// + public static string ToggleTaskTrigger_AccountDomain_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_AccountDomain_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Domain. + /// + public static string ToggleTaskTrigger_AccountDomain_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_AccountDomain_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enables or disables the trigger for the task with the specified name.. + /// + public static string ToggleTaskTrigger_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Whether the trigger of the task is enabled.. + /// + public static string ToggleTaskTrigger_Enabled_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_Enabled_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enabled. + /// + public static string ToggleTaskTrigger_Enabled_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_Enabled_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enable/disable task trigger. + /// + public static string ToggleTaskTrigger_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The password that is used to connect to the computer. If the username and password are not specified, then the current token is used.. + /// + public static string ToggleTaskTrigger_Password_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_Password_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string ToggleTaskTrigger_Password_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_Password_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <if(ENABLED)>Enables<endif>Disables<endif> the task trigger.. + /// + public static string ToggleTaskTrigger_Summary { + get { + return ResourceManager.GetString("ToggleTaskTrigger_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the computer to connect to. If empty, then the connection will be to the local computer.. + /// + public static string ToggleTaskTrigger_TargetServer_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_TargetServer_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Server. + /// + public static string ToggleTaskTrigger_TargetServer_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_TargetServer_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path.. + /// + public static string ToggleTaskTrigger_TaskName_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_TaskName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Task Name. + /// + public static string ToggleTaskTrigger_TaskName_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_TaskName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The identifier of the trigger.. + /// + public static string ToggleTaskTrigger_TriggerId_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_TriggerId_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Trigger ID. + /// + public static string ToggleTaskTrigger_TriggerId_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_TriggerId_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The username that is used during the connection to the computer. If not specified, then the current token is used.. + /// + public static string ToggleTaskTrigger_UserName_Description { + get { + return ResourceManager.GetString("ToggleTaskTrigger_UserName_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string ToggleTaskTrigger_UserName_FriendlyName { + get { + return ResourceManager.GetString("ToggleTaskTrigger_UserName_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to When the workstation starts up.. + /// + public static string TriggerType_Boot_Description { + get { + return ResourceManager.GetString("TriggerType_Boot_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At startup. + /// + public static string TriggerType_Boot_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Boot_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered on a daily schedule.. + /// + public static string TriggerType_Daily_Description { + get { + return ResourceManager.GetString("TriggerType_Daily_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On a daily schedule. + /// + public static string TriggerType_Daily_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Daily_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered by an event.. + /// + public static string TriggerType_Event_Description { + get { + return ResourceManager.GetString("TriggerType_Event_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On an event. + /// + public static string TriggerType_Event_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Event_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered when the workstation goes idle.. + /// + public static string TriggerType_Idle_Description { + get { + return ResourceManager.GetString("TriggerType_Idle_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On idle. + /// + public static string TriggerType_Idle_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Idle_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered when logged on.. + /// + public static string TriggerType_Logon_Description { + get { + return ResourceManager.GetString("TriggerType_Logon_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At log on. + /// + public static string TriggerType_Logon_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Logon_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered on a monthly schedule.. + /// + public static string TriggerType_Monthly_Description { + get { + return ResourceManager.GetString("TriggerType_Monthly_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On a monthly schedule. + /// + public static string TriggerType_Monthly_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Monthly_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered on a monthly schedule by day of the week.. + /// + public static string TriggerType_MonthlyDayOfWeek_Description { + get { + return ResourceManager.GetString("TriggerType_MonthlyDayOfWeek_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On a monthly schedule by day of the week. + /// + public static string TriggerType_MonthlyDayOfWeek_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_MonthlyDayOfWeek_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered when a task is created or modified.. + /// + public static string TriggerType_Registration_Description { + get { + return ResourceManager.GetString("TriggerType_Registration_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to At task creation/modification. + /// + public static string TriggerType_Registration_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Registration_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered when the state of the session changes.. + /// + public static string TriggerType_SessionStateChange_Description { + get { + return ResourceManager.GetString("TriggerType_SessionStateChange_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On session state change. + /// + public static string TriggerType_SessionStateChange_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_SessionStateChange_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered only one time.. + /// + public static string TriggerType_Time_Description { + get { + return ResourceManager.GetString("TriggerType_Time_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to One time. + /// + public static string TriggerType_Time_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Time_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Triggered on a weekly schedule.. + /// + public static string TriggerType_Weekly_Description { + get { + return ResourceManager.GetString("TriggerType_Weekly_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to On a weekly schedule. + /// + public static string TriggerType_Weekly_FriendlyName { + get { + return ResourceManager.GetString("TriggerType_Weekly_FriendlyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create a trigger to execute a task on a weekly schedule.. + /// + public static string Weekly_Summary { + get { + return ResourceManager.GetString("Weekly_Summary", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Perform operations related to the Windows Task Scheduler.. + /// + public static string WindowsTaskScheduler_Description { + get { + return ResourceManager.GetString("WindowsTaskScheduler_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Task Scheduler. + /// + public static string WindowsTaskScheduler_FriendlyName { + get { + return ResourceManager.GetString("WindowsTaskScheduler_FriendlyName", resourceCulture); + } + } + } +} diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Properties/Resources.resx b/modules/Modules.Windows.TaskScheduler.Actions/Properties/Resources.resx new file mode 100644 index 0000000..9d8da56 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Properties/Resources.resx @@ -0,0 +1,1274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, + PublicKeyToken=b77a5c561934e089 + + + + Windows Task Scheduler + + + Perform operations related to the Windows Task Scheduler. + + + Create task + + + Creates a task with the specified name. + + + Create task. + + + Create action in task + + + Creates an action in the task with the specified name. + + + Create action in task. + + + Create trigger for task + + + Creates a trigger for the task with the specified name. + + + Create trigger for task. + + + Delete task + + + Deletes a task with the specified name. + + + Delete task. + + + Delete trigger for task + + + Deletes a trigger for the task with the specified name. + + + Delete trigger for task. + + + Delete action of task + + + Deletes a action of the task with the specified name. + + + Delete action of task. + + + Enable/disable task + + + Enables or disables the task with the specified name. + + + <if(ENABLED)>Enables<endif>Disables<endif> the task. + + + Enable/disable task trigger + + + Enables or disables the trigger for the task with the specified name. + + + <if(ENABLED)>Enables<endif>Disables<endif> the task trigger. + + + Start task + + + Starts the task with the specified name. + + + Start the task. + + + Stop task + + + Stops the task with the specified name. + + + Stop the task. + + + Export task + + + Exports the task with the specified name. + + + Export the task. + + + Import task + + + Imports the task with the specified name. + + + Import the task. + + + Get task + + + Gets the task with the specified name. + + + Get the task. + + + Get tasks in folder + + + Gets the list of tasks in the specified folder. + + + Get tasks in folder. + + + Get actions in task + + + Gets the list of actions in the specified task. + + + Get actions in task. + + + Get triggers for task + + + Gets the list of triggers for a task with the specified name. + + + Get triggers for task. + + + Get task action + + + Gets the action of the task with the specified name. + + + Get task action. + + + Get task trigger + + + Gets the trigger of the task with the specified name. + + + Get task trigger. + + + General + + + The general settings. + + + Advanced + + + The advanced settings. + + + Operation failed + + + Indicates that there was a problem when executing the operation. + + + Folder not found + + + Indicates that the folder was not found. + + + Task not found + + + Indicates that the task was not found. + + + Trigger not found + + + Indicates that the trigger was not found. + + + Trigger operation failed + + + Indicates that there was a problem when executing the trigger operation. + + + Action not found + + + Indicates that the action was not found. + + + Action operation failed + + + Indicates that there was a problem when executing the action operation. + + + On connected from user session from local computer + + + When connected to the user session from local computer. + + + On disconnected from user session from local computer + + + When disconnected from the user session from local computer. + + + On connected from user session from remote computer + + + When connected to the user session from remote computer. + + + On disconnected from user session from remote computer + + + When disconnected from the user session from remote computer. + + + On workstation locked + + + When the workstation is locked. + + + On workstation unlocked + + + When the workstation is unlocked. + + + At startup + + + When the workstation starts up. + + + On a daily schedule + + + Triggered on a daily schedule. + + + On an event + + + Triggered by an event. + + + On idle + + + Triggered when the workstation goes idle. + + + At log on + + + Triggered when logged on. + + + On a monthly schedule by day of the week + + + Triggered on a monthly schedule by day of the week. + + + On a monthly schedule + + + Triggered on a monthly schedule. + + + At task creation/modification + + + Triggered when a task is created or modified. + + + On session state change + + + Triggered when the state of the session changes. + + + One time + + + Triggered only one time. + + + On a weekly schedule + + + Triggered on a weekly schedule. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Arguments + + + The arguments associated with the command-line operation. + + + Path + + + The path to an executable file. + + + Working Directory + + + The directory that contains either the executable file or the files that are used by the executable file. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Days Interval + + + The interval between days. + + + Days Of Month + + + The days of the month. + + + Days Of Week + + + The days of the week. + + + Delay + + + The amount of time between when the trigger is fired and when the task is executed. + + + Enabled + + + Whether the trigger is enabled. + + + Duration + + + The duration that the pattern is repeated. The minimum time allowed is one minute. If zero is specified, the pattern is repeated indefinitely. + + + Expires On + + + The date and time when the trigger is deactivated. The trigger can't start the task after it is deactivated. + + + Start + + + The date and time when the trigger is activated. + + + Timeout + + + The maximum amount of time that the task launched by this trigger is allowed to run. + + + ID + + + The identifier of the trigger. + + + Interval + + + The amount of time in days between each restart of the task. The value must be between 1 minute and 31 days. + + + Weeks Of Month + + + The weeks of the month. + + + Months Of Year + + + The months of the year. + + + Random Delay + + + The delay time that is randomly added to the start time of the trigger. + + + Run On Last Day Of Month + + + Whether the task runs on the last day of the month. + + + State + + + The kind of Terminal Server session change that will trigger the task launch. + + + Stop At End of Repetition Duration + + + Whether a running instance of the task is stopped at the end of repetition pattern duration. + + + Subscription + + + The XPath query string that identifies the event that fires the trigger. + + + Type + + + The type of trigger. + + + User ID + + + The identifier of the user. For example, "MyDomain\MyName" or for a local account, "Administrator". + + + Value Queries + + + The collection of named XPath queries. Each query in the collection is applied to the last matching event XML returned from the subscription query. + + + Weeks Interval + + + The interval between weeks. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Trigger ID + + + The identifier of the trigger. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Filter + + + The regular expression to use as name filter. + + + Folder + + + The path to the folder containing the tasks. + + + Task Names + + + The names of the tasks in the folder. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Triggers + + + The triggers for the task. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Action ID + + + The identifier of the action. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Actions + + + The actions of the task. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Enabled + + + Whether the task is enabled. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Trigger ID + + + The identifier of the trigger. + + + Enabled + + + Whether the trigger of the task is enabled. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + File Name + + + The path to the file. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + File Name + + + The path to the file. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + File Name + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Task + + + The task. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Task Action + + + The task action. + + + Action ID + + + The identifier of the action. + + + Account Domain + + + The domain of the account. + + + Password + + + The password that is used to connect to the computer. If the username and password are not specified, then the current token is used. + + + Server + + + The name of the computer to connect to. If empty, then the connection will be to the local computer. + + + Task Name + + + The name of the task. It can't begin or end with a space character. The '.' character can't be used to specify the current task folder and the '..' characters can't be used to specify the parent task folder in the path. + + + Username + + + The username that is used during the connection to the computer. If not specified, then the current token is used. + + + Task Trigger + + + The task trigger. + + + Trigger ID + + + The identifier of the trigger. + + + Create a trigger to execute a task at startup. + + + Create a trigger to execute a task on a daily schedule. + + + Create a trigger to execute a task on idle. + + + Create a trigger to execute a task at log on. + + + Create a trigger to execute a task on a monthly schedule. + + + Create a trigger to execute a task on a monthly schedule at a day of the week. + + + Create a trigger to execute a task one time. + + + Create a trigger to execute a task on a weekly schedule. + + + Create a trigger to execute a task on an event. + + + Create a trigger to execute a task at task creation/modification. + + + Create a trigger to execute a task on session state change. + + \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskActionObject.cs b/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskActionObject.cs new file mode 100644 index 0000000..d6192b6 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskActionObject.cs @@ -0,0 +1,55 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Enums; +using Newtonsoft.Json; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Types; + +[JsonObject(MemberSerialization.OptOut)] +[Type(DefaultPropertyVisibility = Visibility.Visible)] +public class TaskActionObject : IComparable, IComparable +{ + public string ID { get; private set; } = null!; + public string TaskName { get; private set; } = null!; + public ActionType Type { get; private set; } + + [JsonConstructor] + public TaskActionObject() + { + } + + public TaskActionObject(string taskName, string id, ActionType type) + { + TaskName = taskName; + ID = id; + Type = type; + } + + public int CompareTo(object? obj) + { + if (ReferenceEquals(null, obj)) return 1; + if (ReferenceEquals(this, obj)) return 0; + return obj is TaskActionObject other ? CompareTo(other) : throw new ArgumentException($"Object must be of type {nameof(TaskActionObject)}"); + } + + public int CompareTo(TaskActionObject? other) + { + if (ReferenceEquals(this, other)) return 0; + if (ReferenceEquals(null, other)) return 1; + var actionTypeComparison = Type.CompareTo(other.Type); + if (actionTypeComparison != 0) return actionTypeComparison; + var idComparison = string.Compare(ID, other.ID, StringComparison.InvariantCultureIgnoreCase); + if (idComparison != 0) return idComparison; + return string.Compare(TaskName, other.TaskName, StringComparison.InvariantCultureIgnoreCase); + } + + public override string ToString() + { + return $"{ID} ({Type})"; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskObject.cs b/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskObject.cs new file mode 100644 index 0000000..b803355 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskObject.cs @@ -0,0 +1,73 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Enums; +using Newtonsoft.Json; +using TaskState = PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums.TaskState; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Types; + +[JsonObject(MemberSerialization.OptOut)] +[Type(DefaultPropertyVisibility = Visibility.Visible)] +public class TaskObject : IComparable, IComparable +{ + public bool Enabled { get; private set; } + public bool IsReadOnly { get; private set; } + public DateTime LastRunTime { get; private set; } + public int LastTaskResult { get; private set; } + public string Name { get; private set; } = null!; + public DateTime NextRunTime { get; private set; } + public int NumberOfMissedRuns { get; private set; } + public string Path { get; private set; } = null!; + public TaskState State { get; private set; } + + [JsonConstructor] + public TaskObject() + { + } + + internal TaskObject( + string name, + string path, + bool enabled, + TaskState state, + bool isReadOnly, + DateTime lastRunTime, + int lastTaskResult, + DateTime nextRunTime, + int numberOfMissedRuns) + { + Name = name; + Path = path; + Enabled = enabled; + State = state; + IsReadOnly = isReadOnly; + LastRunTime = lastRunTime; + LastTaskResult = lastTaskResult; + NextRunTime = nextRunTime; + NumberOfMissedRuns = numberOfMissedRuns; + } + + public int CompareTo(object? obj) + { + if (ReferenceEquals(null, obj)) return 1; + if (ReferenceEquals(this, obj)) return 0; + return obj is TaskObject other ? CompareTo(other) : throw new ArgumentException($"Object must be of type {nameof(TaskObject)}"); + } + + public int CompareTo(TaskObject? other) + { + if (ReferenceEquals(null, other)) return 1; + if (ReferenceEquals(this, other)) return 0; + return string.Compare(Name, other.Name, StringComparison.InvariantCultureIgnoreCase); + } + + public override string ToString() + { + return Name; + } +} \ No newline at end of file diff --git a/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskTriggerObject.cs b/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskTriggerObject.cs new file mode 100644 index 0000000..c777170 --- /dev/null +++ b/modules/Modules.Windows.TaskScheduler.Actions/Types/TaskTriggerObject.cs @@ -0,0 +1,61 @@ +// -------------------------------------------------------------- +// Copyright (c) Jesus Fernandez. All Rights Reserved. +// -------------------------------------------------------------- + +using System; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; +using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Enums; +using Newtonsoft.Json; +using PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Enums; + +namespace PowerAutomate.Desktop.Modules.Windows.TaskScheduler.Actions.Types; + +[JsonObject(MemberSerialization.OptOut)] +[Type(DefaultPropertyVisibility = Visibility.Visible)] +public class TaskTriggerObject +{ + public bool Enabled { get; private set; } + public DateTime EndBoundary { get; private set; } + public TimeSpan ExecutionTimeLimit { get; private set; } + public string ID { get; private set; } = null!; + public TimeSpan RepetitionDuration { get; private set; } + public TimeSpan RepetitionInterval { get; private set; } + public bool RepetitionStopAtDurationEnd { get; private set; } + public DateTime StartBoundary { get; private set; } + public string TaskName { get; private set; } = null!; + public TriggerType Type { get; private set; } + + [JsonConstructor] + public TaskTriggerObject() + { + } + + internal TaskTriggerObject( + string taskName, + string id, + TriggerType type, + bool enabled, + DateTime startBoundary, + DateTime endBoundary, + TimeSpan executionTimeLimit, + bool repetitionStopAtDurationEnd, + TimeSpan repetitionInterval, + TimeSpan repetitionDuration) + { + TaskName = taskName; + ID = id; + Type = type; + Enabled = enabled; + StartBoundary = startBoundary; + EndBoundary = endBoundary; + ExecutionTimeLimit = executionTimeLimit; + RepetitionStopAtDurationEnd = repetitionStopAtDurationEnd; + RepetitionInterval = repetitionInterval; + RepetitionDuration = repetitionDuration; + } + + public override string ToString() + { + return $"{ID} ({Type})"; + } +} \ No newline at end of file diff --git a/tests/Modules.Actions.Tests/ActionTests.cs b/tests/Modules.Actions.Tests/ActionTests.cs index 0b2d62a..25aaa4d 100644 --- a/tests/Modules.Actions.Tests/ActionTests.cs +++ b/tests/Modules.Actions.Tests/ActionTests.cs @@ -112,6 +112,32 @@ public void Action_All_Errors_All_HasLocalizableResources() } } + [Test] + public void Action_All_Groups_All_HasLocalizableResources() + { + var assemblies = ModuleEnumerator.GetAllAssemblies(); + foreach (var assembly in assemblies) + { + var resourceManager = assembly.GetResourceManager(); + var groups = assembly.ExportedTypes + .Select(type => (ActionType: type, ActionAttribute: type.GetCustomAttribute())) + .Where(pair => pair.ActionAttribute is not null) + .SelectMany(pair => pair.ActionType.GetCustomAttributes()) + .Select(attribute => attribute.Name) + .Distinct() + .ToList(); + + foreach (var group in groups) + { + var friendlyNameResource = resourceManager.GetString($"Group_{group}_FriendlyName"); + var descriptionResource = resourceManager.GetString($"Group_{group}_Description"); + + Assert.That(friendlyNameResource, Is.Not.Null.Or.Empty, $"Group '{group}' doesn't have a friendly name resource"); + Assert.That(descriptionResource, Is.Not.Null.Or.Empty, $"Group '{group}' doesn't have a friendly name resource"); + } + } + } + [Test] public void Action_All_HasLocalizableResources() { diff --git a/tests/Modules.Actions.Tests/Modules.Actions.Tests.csproj b/tests/Modules.Actions.Tests/Modules.Actions.Tests.csproj index f8ca6d6..f04c037 100644 --- a/tests/Modules.Actions.Tests/Modules.Actions.Tests.csproj +++ b/tests/Modules.Actions.Tests/Modules.Actions.Tests.csproj @@ -9,11 +9,13 @@ + +