> For the complete documentation index, see [llms.txt](https://docs.tailent.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tailent.com/scripting-utility-classes/common-scripts-repository/c-scripts-repository/start-a-process.md).

# Start a process

This script will require adding **using System.Diagnostics;** to the namespaces section.

```csharp
Process Proc = new System.Diagnostics.Process();

Proc.StartInfo.WorkingDirectory = "Folder Path";
//Choose the folder path

Proc.StartInfo.FileName = "executable.exe";
//Choose the executable file

Proc.StartInfo.Arguments = "";
//Specify arguments

Proc.StartInfo.UseShellExecute = true;
Proc.StartInfo.RedirectStandardOutput = false;
Proc.Start();
Proc.WaitForExit();
```

{% hint style="info" %}
Using WaitForExit() ensures proper synchronization between the script and the process. Using this will block the current thread and make the script wait for the target process to finish before continuing with the execution flow.
{% endhint %}
