From 79e14897ef7c26f5aea1f6eee55940c315572270 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 19 May 2013 21:03:09 +0000 Subject: WinGui: Change the CLI Helper to use the application startup path rather than the search path when looking for the CLI exe. Apparently OpenWith on windows causes the search path to be different. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5487 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs b/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs index 2e69eacec..0060b1d15 100644 --- a/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs +++ b/win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs @@ -14,6 +14,7 @@ namespace HandBrakeWPF.Helpers using System.IO; using System.Security.Cryptography; using System.Text.RegularExpressions; + using System.Windows.Forms; using Caliburn.Micro; @@ -43,7 +44,7 @@ namespace HandBrakeWPF.Helpers // Get the SHA1 Hash of HandBrakeCLI byte[] hash; - using (Stream stream = File.OpenRead("HandBrakeCLI.exe")) + using (Stream stream = File.OpenRead(Path.Combine(Application.StartupPath, "HandBrakeCLI.exe"))) { hash = SHA1.Create().ComputeHash(stream); } @@ -58,7 +59,7 @@ namespace HandBrakeWPF.Helpers // It's not the same, so start the CLI to get it's version data. Process cliProcess = new Process(); - ProcessStartInfo handBrakeCli = new ProcessStartInfo("HandBrakeCLI.exe", " -u -v0") + ProcessStartInfo handBrakeCli = new ProcessStartInfo(Path.Combine(Application.StartupPath, "HandBrakeCLI.exe"), " -u -v0") { UseShellExecute = false, RedirectStandardError = true, -- cgit v1.2.3