using System;
using System.Drawing;
using System.Diagnostics;
public static class VoiceBotScript
{
public static void Run(IntPtr windowHandle)
{
Process process = new Process
{
StartInfo =
{
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
FileName = "C:\\path\\to\\your\\file.bat",
Arguments = "1"
}
};
process.Start();
process.WaitForExit();
if(process.HasExited)
{
BFS.Dialog.ShowMessageInfo("exited");
}
}
}using System;
using System.Drawing;
using System.Diagnostics;
public static class VoiceBotScript
{
public static void Run(IntPtr windowHandle)
{
Process process = new Process
{
StartInfo =
{
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true,
FileName = "C:\\path\\to\\your\\file.bat",
Arguments = "1"
}
};
process.Start();
process.WaitForExit();
if(process.HasExited)
{
BFS.Dialog.ShowMessageInfo("exited");
}
}
}