Enhancments for conversions

Topics: Errors
Feb 16, 2016 at 2:30 PM
Edited Feb 16, 2016 at 2:35 PM

I found that in some cases windows task cannot be converted to low version. (win7->win 2003)
It would be good if such conversions are not available in task edit dialog.
  1. If task is created inside sub folder. (\Windows for example)
  2. if task has any unsupported action (send message for example)
  3. if task has any trigger with unsupported properties (Delay task for up to (random delay))
Feb 16, 2016 at 8:01 PM
Great suggestions. This will be included in the 2.5.15 release.
Feb 17, 2016 at 3:50 PM
Thanks a lot!
Also I found the similar situation during converting from win10 to win7.
If task contains custom trigger it cannot be converted to low version win7 and throw unhandled exception if you try to change configuration from win 10 to win 7.
Existing task to test "Device Install Reboot Required"

xception: System.ArgumentException
Message: Value does not fall within the expected range.
Stack Trace:
   at Microsoft.Win32.TaskScheduler.V2Interop.ITaskDefinition.get_XmlText()
   at Microsoft.Win32.TaskScheduler.Trigger.CreateTrigger(ITrigger iTrigger, ITaskDefinition iDef) in C:\spb.Common Components\TaskScheduler\TaskService\Trigger.cs:line 625
   at Microsoft.Win32.TaskScheduler.TriggerCollection.<GetEnumerator>b__38_0(Object o) in C:\spb.Common Components\TaskScheduler\TaskService\TriggerCollection.cs:line 298
   at System.Runtime.InteropServices.ComEnumerator`2.get_Current() in C:\spb.Common Components\TaskScheduler\TaskService\Native\InteropUtil.cs:line 120
   at Microsoft.Win32.TaskScheduler.TriggerCollection.Find(Predicate`1 match) in C:\spb.Common Components\TaskScheduler\TaskService\TriggerCollection.cs:line 258
   at Microsoft.Win32.TaskScheduler.TriggerCollection.ContainsType(Type triggerType) in C:\spb.Common Components\TaskScheduler\TaskService\TriggerCollection.cs:line 201
   at Microsoft.Win32.TaskScheduler.TaskDefinition.GetLowestSupportedVersion(IList`1 outputList) in C:\spb.Common Components\TaskScheduler\TaskService\Task.cs:line 2084
   at Microsoft.Win32.TaskScheduler.TaskDefinition.Validate(Boolean throwException) in C:\spb.Common Components\TaskScheduler\TaskService\Task.cs:line 1968
   at Microsoft.Win32.TaskScheduler.TaskPropertiesControl.taskVersionCombo_SelectedIndexChanged(Object sender, EventArgs e) in C:\spb.Common Components\TaskScheduler\TaskService\TaskEditor\TaskPropertiesControl.cs:line 1071
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ComboBox.WndProc(Message& m)
   at System.Windows.Forms.DisabledItemComboBox.WndProc(Message& m) in C:\spb.Common Components\TaskScheduler\TaskService\TaskEditor\Native\DisabledItemComboBox.cs:line 492
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Feb 17, 2016 at 6:25 PM
Thank you again. I have added improved error handling in 2.5.15 to prevent this problem.