Files
Yaulw/@integrate/Snippets.txt
2016-02-15 12:32:26 -05:00

24 lines
853 B
Plaintext

private string GetDefaultBrowserPath()
{
try
{
if (ApplicationSettings.appSettings().LogEvents)
{
CrossProductLogging.WriteEventLogFile("Begin GetDefaultBrowserPath");
}
string key = @"htmlfile\shell\open\command";
RegistryKey registryKey =
Registry.ClassesRoot.OpenSubKey(key, false);
// get default browser path
if (ApplicationSettings.appSettings().LogEvents)
{
CrossProductLogging.WriteEventLogFile("End GetDefaultBrowserPath");
}
return ((string)registryKey.GetValue(null, null)).Split('"')[1];
}
catch
{
return "";
}
}