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)


Public Sub SetAccountInformation ( _
    accountName As String, _
    password As String _
Dim instance As Task
Dim accountName As String
Dim password As String

instance.SetAccountInformation(accountName, _
public void SetAccountInformation(
    string accountName,
    string password



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


Task Class

Task Members

Microsoft.Office.Excel.Server.Addins.ComputeCluster.TaskScheduler Namespace