Cluster.SetEnvironmentVariable Method
Sets a cluster-wide environment variable.
Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)
Usage
Syntax
'Declaration
Public Sub SetEnvironmentVariable ( _
name As String, _
value As String _
)
public void SetEnvironmentVariable (
string name,
string value
)
public:
virtual void SetEnvironmentVariable (
String^ name,
String^ value
) sealed
public final void SetEnvironmentVariable (
String name,
String value
)
public final function SetEnvironmentVariable (
name : String,
value : String
)
Parameters
- name
The name of the environment variable.
- value
The value of the environment variable. If NULL or an empty string, the variable is deleted.
Remarks
The sum of all environment variables is limited to 2,048 Unicode characters.
You can use this method to add, delete, or update an environment variable. However, you cannot delete or update the value of a CCP defined environment variables, such as CCP_CLUSTER_NAME. If you try to update the value of a CCP variable, you will get a duplicate entry.
To retrieve the cluster-wide environment variables, access the Cluster.EnvironmentVariables property.
To set task-specific environment variables, call the Task.SetEnvironmentVariable method.
To retrieve the variable from within a 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
Cluster Class
Cluster Members
Microsoft.ComputeCluster Namespace
EnvironmentVariables
Task.SetEnvironmentVariable