SPT-AKI-Installer/Aki.Helper/ProcessHelper.cs

30 lines
735 B
C#
Raw Normal View History

using System.Diagnostics;
2022-05-13 22:41:15 +01:00
2022-05-14 02:58:38 +01:00
namespace SPT_AKI_Installer.Aki.Helper
2022-05-13 22:41:15 +01:00
{
public class ProcessHelper
{
private Process _process;
/// <summary>
/// Starts process with path and file name including include .exe,
/// sets working directory too
/// </summary>
public void StartProcess(string exeDir, string workingDir)
{
_process = new Process();
_process.StartInfo.FileName = exeDir;
_process.StartInfo.WorkingDirectory = workingDir;
_process.Start();
}
/// <summary>
/// Kills the Process
/// </summary>
public void EndProcess()
{
_process.Kill();
}
}
}