Hi,
Is it possible to access and programmatically set the "Delay task for" Advance setting in an At Logon task. I note that a number of 'TriggerRundomDelayMinutes' properties have been added to TTaskTrigger but there doesn't seem to be one for an At Logon task - and I'm not sure if these properties are involved with setting a delay in the first place?
Cheers,
Nigel
Delay at Logon scheduled task
Re: Delay at Logon scheduled task
Hello,
We will add the respective property to the class in the next update. Meantime, you can use the following code as a workaround for this:
Hope this helps.
We will add the respective property to the class in the next update. Meantime, you can use the following code as a workaround for this:
Code: Select all
function GetLogonDelayMinutes(const ATrigger: TTrigger): DWORD;
var
iLogon: ILogonTrigger;
begin
iLogon := ATrigger.GetVistaTrigger as ILogonTrigger;
Result := VistaPattern2Minutes(iLogon.Delay);
end;
procedure SetLogonDelayMinutes(const ATrigger: TTrigger; const AMinutes: DWORD);
var
iLogon: ILogonTrigger;
begin
iLogon := ATrigger.GetVistaTrigger as ILogonTrigger;
iLogon.Delay := Minutes2VistaPattern(AMinutes);
end;
Best regards,
Igor Siticov.
Igor Siticov.
Re: Delay at Logon scheduled task
Many thanks Igor!