Process.setEnv

Set the process' environment variables from the associative array received by the method. Returns a 'this' reference for chaining.

This also clears the copyEnv flag.

class Process
setEnv

Parameters

env istring[istring]

associative array of strings containing the environment variables for the process. The variable name should be the key used for each entry.

Return Value

Type: Process

A reference to this process object

Examples

void example ( )
{
    auto p = new Process;
    istring[istring] env;
    env["MYVAR1"] = "first";
    env["MYVAR2"] = "second";
    p.setEnv(env).execute();
}

Meta