Share via


Task.SetEnvironmentVariable Method

Sets the task-specific environment variable.

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

Usage

Syntax

'Declaration
Public Sub SetEnvironmentVariable ( _
    variableName As String, _
    variableValue As String _
)
public void SetEnvironmentVariable (
    string variableName,
    string variableValue
)
public:
virtual void SetEnvironmentVariable (
    String^ variableName, 
    String^ variableValue
) sealed
public final void SetEnvironmentVariable (
    String variableName, 
    String variableValue
)
public final 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 Cluster.SetEnvironmentVariable method.

The environment variables that are made available to the task include variables set using this method, those set using the Cluster.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

Task Class
Task Members
Microsoft.ComputeCluster Namespace
Cluster.SetEnvironmentVariable Method
EnvironmentVariables