ITask.SetEnvironmentVariable Method

Sets the task-specific environment variable.

Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)

Usage

Syntax

'Declaration
Sub SetEnvironmentVariable ( _
    variableName As String, _
    variableValue As String _
)
void SetEnvironmentVariable (
    string variableName,
    string variableValue
)
void SetEnvironmentVariable (
    String^ variableName, 
    String^ variableValue
)
void SetEnvironmentVariable (
    String variableName, 
    String variableValue
)
function SetEnvironmentVariable (
    variableName : String, 
    variableValue : String
)

Parameters

  • variableName
    The name of the environment variable.
  • variableValue
    The value of the environment variable.

Remarks

The length of all environment variables specified for the task is limited to 2,048 Unicode characters.

To set cluster-wide environment variables, call the ICluster.SetEnvironmentVariable method.

The environment variables that are made available to the task include variables set using this method, those set using the ICluster.SetEnvironmentVariable method, and the compute cluster environment variables that are defined in the "Use Environment Variables" section of the Compute Cluster Server User Operations.

To retrieve this variable from inside your task, call the System.Environment.GetEnvironmentVariable(System.String) method.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003, Windows XP

Target Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003 with Compute Cluster Pack Client Utilities, Windows XP with Compute Cluster Pack Client Utilities

See Also

Reference

ITask Interface
ITask Members
Microsoft.ComputeCluster Namespace
ICluster.SetEnvironmentVariable Method
EnvironmentVariables