summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-05-19 21:03:09 +0000
committersr55 <[email protected]>2013-05-19 21:03:09 +0000
commit79e14897ef7c26f5aea1f6eee55940c315572270 (patch)
tree19db87d9496d673239bc6f7defed1c6e3ff9a81e /win/CS
parentdf40df10c06a92609979c34dc461d9807669cc54 (diff)
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
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/CliCheckHelper.cs5
1 files changed, 3 insertions, 2 deletions
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,