Hello,
Our team is writing an app. that uses OE102B to create Windows Task Schedules.
One of our requirements is that tasks should run whether a user is logged in or not.
Research into this area suggests we should be creating a task service/definition like this;
ts:RootFolder:RegisterTaskDefinition(INPUT lvcTaskName,
INPUT td,
INPUT Microsoft.Win32.TaskScheduler.TaskCreation:CreateOrUpdate,
INPUT "SYSTEM",
INPUT ?,
INPUT Microsoft.Win32.TaskScheduler.TaskLogonType:ServiceAccount,
INPUT lvcFolderName) NO-ERROR.
Previously the code looked like this (where tf is a TaskFolder);
td:Principal:LogonType = TaskLogonType:InteractiveToken.
tf:RegisterTaskDefinition(lvcTaskName, td).
This is simple, works well but does not run the task if the user is not logged on.
The problem we are having is that in the first code example the ? value is causing the error;
System.ArgumentException: Value does not fall within the expected range.
According to Microsoft's documentation, this value should be an empty VARIANT value such as VT_NULL or VT_EMPTY.
My question is; how do we represent this in OE?
Thankyou.
OEDev
Well, if I look at the defintion it seems just an integer:
Well, if I look at the defintion it seems just an integer: