Task.SetAccountInformation Method
Sets the account under which the task is to run.
Namespace: Microsoft.Office.Excel.Server.Addins.ComputeCluster.TaskScheduler
Assembly: Microsoft.Office.Excel.Server.Addins.ComputeCluster (in Microsoft.Office.Excel.Server.Addins.ComputeCluster.dll)
Syntax
'Declaration
Public Sub SetAccountInformation ( _
accountName As String, _
password As String _
)
'Usage
Dim instance As Task
Dim accountName As String
Dim password As String
instance.SetAccountInformation(accountName, _
password)
public void SetAccountInformation(
string accountName,
string password
)
Parameters
- accountName
Type: System.String
Full account name.
- password
Type: System.String
Password for the account.
Remarks
To have the task run under the local system account, pass the empty string ("") as the account name and a null reference (Nothing in Visual Basic) as the password. The caller must be running as an administrator account or in the local system account.
You can also specify a a null reference (Nothing in Visual Basic) password if the task has the RunOnlyIfLoggedOn flag set. This allows you to schedule a task for an account for which you do not know the password; however, the account must be logged on interactively at the time the task runs.
See Also
Reference
Microsoft.Office.Excel.Server.Addins.ComputeCluster.TaskScheduler Namespace