diff --git a/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml b/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml
index 4202aa5c6..b966d56be 100644
--- a/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml
+++ b/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml
@@ -7,33 +7,37 @@
xmlns:ci="using:AppControlManager.CodeIntegrity"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:ui="using:CommunityToolkit.WinUI"
+ xmlns:controls="using:CommunityToolkit.WinUI.Controls"
mc:Ignorable="d">
-
-
-
-
-
+
-
@@ -57,6 +61,16 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs b/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs
index 4391b42fc..de8993e89 100644
--- a/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs
+++ b/AppControl Manager/Pages/SystemInformation/CodeIntegrityInfo.xaml.cs
@@ -1,5 +1,6 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Navigation;
namespace AppControlManager.Pages;
@@ -9,9 +10,29 @@ public CodeIntegrityInfo()
{
this.InitializeComponent();
- this.NavigationCacheMode = Microsoft.UI.Xaml.Navigation.NavigationCacheMode.Enabled;
+ this.NavigationCacheMode = NavigationCacheMode.Enabled;
}
+
+ ///
+ /// Local method to convert numbers to their actual string values
+ ///
+ ///
+ ///
+ private static string? GetPolicyStatus(uint? status) => status switch
+ {
+ 0 => "Disabled/Not running",
+ 1 => "Audit mode",
+ 2 => "Enforced Mode",
+ _ => null
+ };
+
+
+ ///
+ /// Event handler for the retrieve code integrity information button
+ ///
+ ///
+ ///
private void RetrieveCodeIntegrityInfo_Click(object sender, RoutedEventArgs e)
{
// Get the system code integrity information
@@ -19,5 +40,12 @@ private void RetrieveCodeIntegrityInfo_Click(object sender, RoutedEventArgs e)
// Bind the CodeIntegrityDetails (List) to the ListView
CodeIntegrityInfoListView.ItemsSource = codeIntegrityInfoResult.CodeIntegrityDetails;
+
+ // Get the Application Control Status
+ DeviceGuardStatus? DGStatus = DeviceGuardInfo.GetDeviceGuardStatus();
+
+ UMCI.Text = GetPolicyStatus(DGStatus?.UsermodeCodeIntegrityPolicyEnforcementStatus);
+ KMCI.Text = GetPolicyStatus(DGStatus?.CodeIntegrityPolicyEnforcementStatus);
+
}
}