Beispiel #1
0
    private WinProcess createProcess()
    {
        var process = new WinProcess("cmd");

        process.SetWorkingDirectory(workingDirectory);
        if (outputToConsole)
        {
            process.WriteOutputToConsole();
        }
        process.UseArgumentNameDelimiter("/");
        process.AddArgument("C");
        process.UseArgumentNameDelimiter("");
        process.AddArgument(otherProcess.CommandText());
        return(process);
    }
Beispiel #2
0
    private WinProcess createWinProcess()
    {
        var process = new WinProcess(fileName);

        if (outputToConsole)
        {
            process.WriteOutputToConsole();
        }
        process.UseArgumentNameDelimiter("--");
        process.UseArgumentValueDelimiter(" ");
        process.AddArgument("environment", environment.Value);
        process.SetWorkingDirectory(workingDirectory);
        var dict = config.ToDictionary();

        foreach (var key in dict.Keys)
        {
            process.AddArgument(key, new Quoted(dict[key]));
        }
        return(process);
    }