public static Boolean QueryQuota(Abstractions.WindowsApi.pInvokes.structenums.RegistryLocation where, string name)
{
LibraryLogging.Info("query Quota for {0}", name);
try
{
using (RegistryKey key = Abstractions.WindowsApi.pInvokes.GetRegistryLocation(where).OpenSubKey(name + @"\Software\Microsoft\Windows\CurrentVersion\Policies\System"))
{
if (key.GetValue("EnableProfileQuota") == null)
{
return false;
}
}
}
catch (Exception ex)
{
LibraryLogging.Error("Can't get profile quota for {0} Error:{1}", name, ex.Message);
return false;
}
return true;
}