Error on Windows 7 64-bit Tablet Edition

This forum is designated to discuss SiComponents Scheduling Agent.
Post Reply
moosoft
Posts: 9
Joined: Thu Mar 11, 2010 5:26 pm

Error on Windows 7 64-bit Tablet Edition

Post by moosoft »

This only seems to be happening on a Windows 7 Tablet PC. Is there something special about the platform that I need to address?

The error:

Code: Select all

exception number  : 4
exception class   : EOleException
exception message : (55,4):EndBoundary:.
The code:

Code: Select all

procedure tfintegra.addschedule;
var
  TriggerDetails: TTriggerDetails;
  ST: TSystemTime;
  task: ttaskitem;
  saved: boolean;
begin
  scheduler.Open;
  scheduler.Refresh;
  try
    task:=Scheduler.CreateNewItem('Integra System Verify Report');
    with task do
    begin
      // 2 lines optional necessary for Windows VISTA
      CurrentAction := 1;
      InsertAction(VISTA_TASK_ACTION_EXEC);

      creator:='MooSoft Scheduler';

      ApplicationName := extractfilepath(paramstr(0))+'integra.exe';
      Parameters := '/verify';

      comment:='Creates a System Verify Report';

      Triggers.Add(ttDaily);
      DateTimeToSystemTime(Now, ST);
      ST.wHour := 4;
      ST.wMinute := 0;
      ST.wSecond := 0;
      ST.wMilliseconds := 0;
      Triggers[0].StartTime := SystemTimeToDateTime(ST);
      Triggers[0].BeginDate := Date;
      Triggers[0].EndDate := Date + 30; // will be executed during 1 month
      Triggers[0].HasEndDate := false;
      TriggerDetails.Daily.DaysInterval := 1;

      Triggers[0].Details := TriggerDetails;
      Triggers.UpdateTriggers;
      if (not Scheduler.RunningVistaOrLater) then
        Flags := Flags + [tfRunOnlyIfLoggedOn];
      SetAccountInformation(GetOSUser, '');
      if Scheduler.RunningVistaOrLater and IsUserAnAdmin then
        TaskDefinition.Principal.RunLevel := TASK_RUNLEVEL_HIGHEST;

      saved:=true;
      try
        Save;  //<-- error here
      except
        on e&#58; exception do
          begin
            saved&#58;=false;
            addlog&#40;'Add Task', e.Message&#41;;
            taskdlg.Title&#58;='Add Task';
            taskdlg.Instruction&#58;='The task could not be saved due to an error.';
            taskdlg.Content&#58;=e.Message;
            taskdlg.CommonButtons&#58;=&#91;cbok&#93;;
            taskdlg.Icon&#58;=tierror;
            taskdlg.Execute;
          end;
      end;
    end;

    if saved then
      begin
        propertiesdlg&#40;task&#41;;

        schedulesnapshot1.Enabled&#58;=false;
        removescheduledsnapshot1.enabled&#58;=true;
        editscheduledsnapshot1.Enabled&#58;=true;

        taskdlg.Title&#58;='Add Task';
        taskdlg.Instruction&#58;='The task has been added.';
        taskdlg.CommonButtons&#58;=&#91;cbok&#93;;
        taskdlg.Icon&#58;=tiinformation;
        taskdlg.Execute;
      end;
  except
    taskdlg.Title&#58;='Add Task';
    taskdlg.Instruction&#58;='The task could not be added at this time.  Please try again later.';
    taskdlg.CommonButtons&#58;=&#91;cbok&#93;;
    taskdlg.Icon&#58;=tierror;
    taskdlg.Execute;
  end;
  scheduler.Close;
end;

isiticov
Site Admin
Posts: 2204
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Do you use the latest version available from our web site?

moosoft
Posts: 9
Joined: Thu Mar 11, 2010 5:26 pm

Post by moosoft »

Ah no, I have 2.0.3

I should have remembered to check that. I have had to send an email to support asking for my login info as it has been so long since I used it.

I will let you know what happens!

moosoft
Posts: 9
Joined: Thu Mar 11, 2010 5:26 pm

Post by moosoft »

Ok, I got the 2.0.6 update but now when I compile I get:
[DCC Fatal Error] integrau.pas(16): F2051 Unit saTask was compiled with a different version of MSTask.ITaskTrigger

Any idea how to fix that?

isiticov
Site Admin
Posts: 2204
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

The reason for this could be an existing installation of JEDI library, which includes MsTask unit too. Just adjust your project library path settings to include the Scheduling Agent sources' path before the JEDI's.

moosoft
Posts: 9
Joined: Thu Mar 11, 2010 5:26 pm

Post by moosoft »

Ok, fixed it. The installer (I guess) set the path to:

C:\Program Files (x86)\SiComponents\Scheduling Agent\Source\CRS2009

and changing it to

C:\Program Files (x86)\SiComponents\Scheduling Agent\Source

fixed it.

moosoft
Posts: 9
Joined: Thu Mar 11, 2010 5:26 pm

Post by moosoft »

It seems to be working so far. Haven't been able to test on the Win7 Tablet Edition yet.

On a side note, there is a typo in props.pas->PageControl->Settings->PanelVistaSettings->ListVistaFlags

There is "hiden" and should be "hidden"

I love this component. You have saved me so much work :)

isiticov
Site Admin
Posts: 2204
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Thank you for reproting this. We will fix this.

Post Reply