diff options
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/frmPreview.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/win/CS/frmPreview.cs b/win/CS/frmPreview.cs index 4251923f3..f070e0503 100644 --- a/win/CS/frmPreview.cs +++ b/win/CS/frmPreview.cs @@ -241,20 +241,24 @@ namespace Handbrake }
else
{
+ if (!File.Exists(UserSettingService.GetUserSetting<string>(UserSettingConstants.VLC_Path)))
+ {
+ // Attempt to find VLC if it doesn't exist in the default set location.
+ string vlcPath;
- // Attempt to find VLC if it doesn't exist in the default set location.
- string vlcPath;
-
- if (8 == IntPtr.Size ||
- (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432")))) vlcPath = Environment.GetEnvironmentVariable("ProgramFiles(x86)");
- else vlcPath = Environment.GetEnvironmentVariable("ProgramFiles");
+ if (8 == IntPtr.Size || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
+ vlcPath = Environment.GetEnvironmentVariable("ProgramFiles(x86)");
+ else
+ vlcPath = Environment.GetEnvironmentVariable("ProgramFiles");
+ if (!string.IsNullOrEmpty(vlcPath))
+ {
+ vlcPath = Path.Combine(vlcPath, "VideoLAN\\VLC\\vlc.exe");
+ }
- if (!File.Exists(UserSettingService.GetUserSetting<string>(UserSettingConstants.VLC_Path)))
- {
if (File.Exists(vlcPath))
{
- UserSettingService.SetUserSetting(UserSettingConstants.VLC_Path, "C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe");
+ UserSettingService.SetUserSetting(UserSettingConstants.VLC_Path, vlcPath);
}
else
{
|