diff --git a/LibreHardwareMonitorLib/Hardware/Computer.cs b/LibreHardwareMonitorLib/Hardware/Computer.cs index df0a803..517a978 100644 --- a/LibreHardwareMonitorLib/Hardware/Computer.cs +++ b/LibreHardwareMonitorLib/Hardware/Computer.cs @@ -46,6 +46,7 @@ public class Computer : IComputer private bool _psuEnabled; private SMBios _smbios; private bool _storageEnabled; + private bool _ring0Enabled = true; /// /// Creates a new instance with basic initial . @@ -279,6 +280,16 @@ public class Computer : IComputer } } + /// + public bool IsRing0Enabled + { + get { return _ring0Enabled; } + set + { + _ring0Enabled = value; + } + } + /// /// Contains computer information table read in accordance with System Management BIOS (SMBIOS) Reference Specification. /// @@ -489,7 +500,9 @@ public class Computer : IComputer _smbios = new SMBios(); - Ring0.Open(); + if (IsRing0Enabled) + Ring0.Open(); + Mutexes.Open(); OpCode.Open(); diff --git a/LibreHardwareMonitorLib/Hardware/IComputer.cs b/LibreHardwareMonitorLib/Hardware/IComputer.cs index 2c43a41..8ea1dc8 100644 --- a/LibreHardwareMonitorLib/Hardware/IComputer.cs +++ b/LibreHardwareMonitorLib/Hardware/IComputer.cs @@ -108,9 +108,16 @@ public interface IComputer : IElement /// if a given category of devices is already enabled. bool IsStorageEnabled { get; } + /// + /// Gets or sets a value indicating whether the Ring0 driver should be installed if user privileges is sufficient. + /// + /// if Ring0 driver installation is enabled + /// Default value is . Only affects Windows. + bool IsRing0Enabled { get; } + /// /// Generates full LibreHardwareMonitor report for devices that have been enabled. /// /// A formatted text string with library, OS and hardware information. string GetReport(); -} \ No newline at end of file +}