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 

RUN_ONLY_IF_LOGGED_ON flag

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



Joined: 20 Apr 2011
Posts: 7

PostPosted: Wed Apr 20, 2011 9:19 pm    Post subject: RUN_ONLY_IF_LOGGED_ON flag Reply with quote

When creating a task is marked RUN_ONLY_IF_LOGGED_ON flag from trying to clear the flag properties but to return to view the properties, this continued strong.
s.o: Windows7 development system: Delphi7.
We have seen in forums that existed in the past problems with this flag.
-----------------------------------------------------------------------------------
I'm using VistaFlags Scheduler.RunningVistaOrLater property and function to detect the operating system is running the application, but no way to uncheck RUN_ONLY_IF_LOGGED_ON flag.
Please need help with this, so far the component has been functioning very well.
Thanks.
Ramiro Hernandez
p.d: I have version 2.0.5.0 Component
Back to top
View user's profile Send private message
rm.ramiro



Joined: 20 Apr 2011
Posts: 7

PostPosted: Wed Apr 20, 2011 9:49 pm    Post subject: Reply with quote

in saTask.pas

function TTaskItem.GetVistaFlags: TTaskVistaFlags;
begin
if not FTaskManager.RunningVistaOrLater then
Exit;
if not Assigned(FTaskDefinition) then
Error(sTaskNotActivated, [Name]);
begin
Result := [];
if FTaskDefinition.Settings.AllowDemandStart then
Include(Result, tfvAllowDemandStart);
if FTaskDefinition.Settings.AllowHardTerminate then
Include(Result, tfvAllowHardTerminate);
if FTaskDefinition.Settings.DisallowStartIfOnBatteries then
Include(Result, tfvDisallowStartIfOnBatteries);
if FTaskDefinition.Settings.StopIfGoingOnBatteries then
Include(Result, tfvStopIfGoingOnBatteries);
if FTaskDefinition.Settings.Enabled then
Include(Result, tfvEnabled);
if FTaskDefinition.Settings.Hidden then
Include(Result, tfvHidden);
if FTaskDefinition.Settings.RunOnlyIfIdle then
Include(Result, tfvRunOnlyIfIdle);
if FTaskDefinition.Settings.IdleSettings.StopOnIdleEnd then
Include(Result, tfvStopOnIdleEnd);
if FTaskDefinition.Settings.IdleSettings.RestartOnIdle then
Include(Result, tfvRestartOnIdle);
if FTaskDefinition.Settings.RunOnlyIfNetworkAvailable then
Include(Result, tfvRunOnlyIfNetworkAvailable);
if FTaskDefinition.Settings.StartWhenAvailable then
Include(Result, tfvStartWhenAvailable);
if FTaskDefinition.Settings.WakeToRun then
Include(Result, tfvWakeToRun);
if FTaskDefinition.Principal.LogonType = TASK_LOGON_INTERACTIVE_TOKEN then
Include(Result, tfvNeedLogon);
end;
end;

procedure TTaskItem.SetVistaFlags(const Value: TTaskVistaFlags);
var
tf: TTaskVistaFlag;
begin
if not FTaskManager.RunningVistaOrLater then
Exit;

begin
for tf := Low(TTaskVistaFlag) to High(TTaskVistaFlag) do
begin
case tf of
tfvAllowDemandStart: FTaskDefinition.Settings.AllowDemandStart := tf in
Value;
tfvDisallowStartIfOnBatteries:
FTaskDefinition.Settings.DisallowStartIfOnBatteries := tf in Value;
tfvStopIfGoingOnBatteries:
FTaskDefinition.Settings.StopIfGoingOnBatteries := tf in Value;
tfvEnabled: FTaskDefinition.Settings.Enabled := tf in Value;
tfvHidden: FTaskDefinition.Settings.Hidden := tf in Value;
tfvRunOnlyIfIdle: FTaskDefinition.Settings.RunOnlyIfIdle := tf in Value;
tfvStopOnIdleEnd: FTaskDefinition.Settings.IdleSettings.StopOnIdleEnd :=
tf in Value;
tfvRestartOnIdle: FTaskDefinition.Settings.IdleSettings.RestartOnIdle :=
tf in Value;
tfvRunOnlyIfNetworkAvailable:
FTaskDefinition.Settings.RunOnlyIfNetworkAvailable := tf in Value;
tfvStartWhenAvailable: FTaskDefinition.Settings.StartWhenAvailable := tf
in Value;
tfvWakeToRun: FTaskDefinition.Settings.WakeToRun := tf in Value;
end;
end;
end;

end;

In procedure SetVistaFlags is not present tfvNeedLogon is that correct??
Tanks
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Apr 22, 2011 9:36 am    Post subject: Reply with quote

Hello,

Thank you for reporting this. We're working now under this issue.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed May 25, 2011 5:20 pm    Post subject: Reply with quote

Hello,

Just published new version should fix this issue. Thank you again for reporting 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