SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error on Windows 7 64-bit Tablet Edition

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent
View previous topic :: View next topic  
Author Message
moosoft



Joined: 11 Mar 2010
Posts: 9

PostPosted: Tue Aug 30, 2011 4:28 am    Post subject: Error on Windows 7 64-bit Tablet Edition Reply with quote

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:

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


The code:
Code:

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: exception do
          begin
            saved:=false;
            addlog('Add Task', e.Message);
            taskdlg.Title:='Add Task';
            taskdlg.Instruction:='The task could not be saved due to an error.';
            taskdlg.Content:=e.Message;
            taskdlg.CommonButtons:=[cbok];
            taskdlg.Icon:=tierror;
            taskdlg.Execute;
          end;
      end;
    end;

    if saved then
      begin
        propertiesdlg(task);

        schedulesnapshot1.Enabled:=false;
        removescheduledsnapshot1.enabled:=true;
        editscheduledsnapshot1.Enabled:=true;

        taskdlg.Title:='Add Task';
        taskdlg.Instruction:='The task has been added.';
        taskdlg.CommonButtons:=[cbok];
        taskdlg.Icon:=tiinformation;
        taskdlg.Execute;
      end;
  except
    taskdlg.Title:='Add Task';
    taskdlg.Instruction:='The task could not be added at this time.  Please try again later.';
    taskdlg.CommonButtons:=[cbok];
    taskdlg.Icon:=tierror;
    taskdlg.Execute;
  end;
  scheduler.Close;
end;
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Tue Aug 30, 2011 5:53 am    Post subject: Reply with quote

Do you use the latest version available from our web site?
Back to top
View user's profile Send private message
moosoft



Joined: 11 Mar 2010
Posts: 9

PostPosted: Tue Aug 30, 2011 7:34 am    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
moosoft



Joined: 11 Mar 2010
Posts: 9

PostPosted: Wed Aug 31, 2011 7:17 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Wed Aug 31, 2011 7:31 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
moosoft



Joined: 11 Mar 2010
Posts: 9

PostPosted: Wed Aug 31, 2011 7:35 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
moosoft



Joined: 11 Mar 2010
Posts: 9

PostPosted: Wed Aug 31, 2011 8:13 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Sep 01, 2011 3:10 am    Post subject: Reply with quote

Thank you for reproting this. We will fix this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> VCL Scheduling Agent All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group