 |
SiComponents Forums Here you will be able to get help and share your experience
|
View previous topic :: View next topic |
Author |
Message |
rm.ramiro
Joined: 20 Apr 2011 Posts: 7
|
Posted: Wed Apr 20, 2011 9:19 pm Post subject: RUN_ONLY_IF_LOGGED_ON flag |
|
|
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 |
|
 |
rm.ramiro
Joined: 20 Apr 2011 Posts: 7
|
Posted: Wed Apr 20, 2011 9:49 pm Post subject: |
|
|
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 |
|
 |
isiticov Site Admin
Joined: 21 Nov 2002 Posts: 2129
|
Posted: Fri Apr 22, 2011 9:36 am Post subject: |
|
|
Hello,
Thank you for reporting this. We're working now under this issue. |
|
Back to top |
|
 |
isiticov Site Admin
Joined: 21 Nov 2002 Posts: 2129
|
Posted: Wed May 25, 2011 5:20 pm Post subject: |
|
|
Hello,
Just published new version should fix this issue. Thank you again for reporting this. |
|
Back to top |
|
 |
|
|
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
|