Skip to content

Commit

Permalink
Merge pull request #18 from mscrivo/Issue12
Browse files Browse the repository at this point in the history
This potentially fixes #8
  • Loading branch information
mscrivo committed Sep 19, 2015
2 parents bf07a96 + 24e96a1 commit 27de45a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions OutlookDesktop/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ private static bool IsOutlook2003OrHigherInstalled()
{
Logger.Debug($"Analyzing subkey '{subkey}'");
double versionSubKey;
var culture = CultureInfo.CreateSpecificCulture("en-US");
if (double.TryParse(subkey, NumberStyles.Float, culture, out versionSubKey))
if (double.TryParse(subkey, NumberStyles.Float, new NumberFormatInfo(), out versionSubKey))
{
Logger.Debug($"Office Version: {versionSubKey}");
Logger.Debug($"Office Version: {versionSubKey} Detected");
if (versionSubKey >= 11)
{
Logger.Debug($"Office Version: {versionSubKey} Detected");
hasOffice2003OrHigher = true;
break;
}
Expand All @@ -206,16 +206,17 @@ private static bool IsOutlook2003OrHigherInstalled()
Logger.Debug($"Checking for Outlook exe in: {outlookPath}");
if (File.Exists(Path.Combine(outlookPath, "Outlook.exe")))
{
Logger.Debug("Outlook exe found.");
Logger.Debug("Outlook exe found. We're all good.");
return true;
}
}
}
}

if (outlookPath != null)
Logger.Error(
$"Outlook path was reported as: {Path.Combine(outlookPath, "Outlook.exe")}, but this file could not be found.");
if (!string.IsNullOrEmpty(outlookPath))
{
Logger.Error($"Outlook path was reported as: {Path.Combine(outlookPath, "Outlook.exe")}, but this file could not be found.");
}

return false;
}
Expand Down

0 comments on commit 27de45a

Please sign in to comment.