Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var envar = Environment.GetEnvironmentVariable("PATH"); // Just the Path, no Exe
- int found = 0;
- // Check All Environment Variables Paths for ffmpeg.exe
- //
- foreach (var envarPath in envar.Split(';'))
- {
- // Path + Exe
- var exePath = System.IO.Path.Combine(envarPath, "ffmpeg.exe");
- // Check
- if (File.Exists(exePath))
- {
- found = 1;
- }
- }
- // Display Message if FFmpeg exists
- //
- if (found == 1)
- {
- MessageBox.Show("FFmpeg exists.");
- }
- else if (found == 0)
- {
- MessageBox.Show("Cannot locate FFmpeg.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement