> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksprocessutils.md).

# Class ksProcessUtils

Namespace: [KS.Unity.Editor](/reactor/api-reference/ks.unity.editor.md)\
Assembly: KSUnity-Editor.dll

Provides a utility function for starting a minimized process window that does not steal focus on Windows using p-invoke. On other platforms, starts the process normally. <https://docs.microsoft.com/en-us/windows/win32/procthread/creating-processes>

```csharp
public class ksProcessUtils
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksProcessUtils](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksprocessutils.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Methods

### StartProcess(string, string, string, bool) <a href="#ks_unity_editor_ksprocessutils_startprocess_system_string_system_string_system_string_system_boolean" id="ks_unity_editor_ksprocessutils_startprocess_system_string_system_string_system_string_system_boolean"></a>

Starts a process as a minimized window that does not steal focus if on Windows. Starts the process normally on other platforms, or if `useStdOutAndErr` is true.

```csharp
public static Process StartProcess(string filePath, string arguments, string workingDirectory, bool useStdOutAndErr = false)
```

#### Parameters

`filePath` [string](https://learn.microsoft.com/dotnet/api/system.string)

Path of the file to execute.

`arguments` [string](https://learn.microsoft.com/dotnet/api/system.string)

Arguments to pass to the new process.

`workingDirectory` [string](https://learn.microsoft.com/dotnet/api/system.string)

Path of the working directory for the new process.

`useStdOutAndErr` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

True to capture the standard output and error streams. This requires us to use the fallback method of starting a process that opens a window and steals focus on Windows.

#### Returns

[Process](https://learn.microsoft.com/dotnet/api/system.diagnostics.process)

Process that was started.
