private static bool AlreadyRegistered(RegistryKey root)
{
var key = root.OpenSubKey(@"bloom\shell\open\command");
if (key == null)
return false;
var wanted = CommandToLaunchBloomOnWindows;
if (wanted != (key.GetValue("") as string).ToLowerInvariant())
return false;
key = root.OpenSubKey("bloom");
if (key.GetValue("") as string != "BLOOM:URL Protocol")
return false;
if (key.GetValue("URL Protocol") as string != "")
return false;
return true;
}