public static bool IsInPATH(string command) { bool isInPath = false; / / determine whether there is any commands in the PATH foreach (string test in (Environment. GetEnvironmentVariable (" PATH ")?? "").Split('; ')) { string path = test.Trim(); if (! String.IsNullOrEmpty(path) && File.Exists(Path.Combine(path, command))) { isInPath = true; break; } return isInPath;} return isInPath;} return isInPath; }

IsInPATH(“ffmpeg.exe”); // return the bool value