Utilities

Frends.Utilities.RunProcess / 1.1.0

Summary

Runs a program on the agent with arguments and a working directory, returning its exit code and both output streams. This executes arbitrary code with the agent's own privileges.

Typical use — reaching for a command line tool no Task covers — never build the arguments from untrusted input, since that is where command injection gets in

Details

Frends version
5.5 and newer
Agent
Crossplatform
Target framework
net6.0

Input class usually contains parameters that are required.

Name Type Default Example Description
FileName String cmd.exe cmd.exe

An application or document with which to start a process. Use cmd.exe to execute command on "command line".

Arguments String[] [ "/C", "echo Hello" ]

Command-line arguments to use when starting the application. For Windows use /C start and on Unix use -c.

WorkingDirectory String /working/directory OR C:\working\directory

Working directory for the process.

An unhandled error has occurred. Reload 🗙