# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tailent.com/scripting-utility-classes/common-scripts-repository/c-scripts-repository/start-a-process.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
