From a3971dabce01d45f865d77e411c2ebb86ccaa59c Mon Sep 17 00:00:00 2001 From: Violet Hansen Date: Thu, 16 Jan 2025 09:00:18 +0200 Subject: [PATCH] Minor improvements before AppControl Manager v.0.1.8.4 release Tidied up the settings page for user configurations. Adjusted XML Serializer version Removed unnecessary user configurations assignments for strict kernel-mode policy --- AppControl Manager/AppControl Manager.csproj | 2 +- AppControl Manager/Pages/CreatePolicy.xaml.cs | 10 -------- .../Pages/CreateSupplementalPolicy.xaml.cs | 9 +++++--- AppControl Manager/Pages/Settings.xaml | 8 ------- AppControl Manager/Pages/Settings.xaml.cs | 23 +++++-------------- .../Pages/StrictKernelPolicyScanResults.xaml | 2 +- 6 files changed, 14 insertions(+), 40 deletions(-) diff --git a/AppControl Manager/AppControl Manager.csproj b/AppControl Manager/AppControl Manager.csproj index 470ce4cef..a6e217ed7 100644 --- a/AppControl Manager/AppControl Manager.csproj +++ b/AppControl Manager/AppControl Manager.csproj @@ -113,7 +113,7 @@ - + - - - - - - - diff --git a/AppControl Manager/Pages/Settings.xaml.cs b/AppControl Manager/Pages/Settings.xaml.cs index 3f57d261d..fb5f3ac10 100644 --- a/AppControl Manager/Pages/Settings.xaml.cs +++ b/AppControl Manager/Pages/Settings.xaml.cs @@ -301,7 +301,6 @@ private void GetConfigurationButton_Click(object sender, RoutedEventArgs e) SignToolCustomPathTextBox.Text = userConfig.SignToolCustomPath ?? string.Empty; CertificateCommonNameAutoSuggestBox.Text = userConfig.CertificateCommonName ?? string.Empty; CertificatePathTextBox.Text = userConfig.CertificatePath ?? string.Empty; - StrictKernelModePolicyTimeTextBox.Text = userConfig.StrictKernelModePolicyTimeOfDeployment?.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture) ?? string.Empty; } // When the edit button of any field is pressed @@ -329,9 +328,6 @@ private void EditButton_Click(object sender, RoutedEventArgs e) case "CertificatePath": newValue = CertificatePathTextBox.Text; break; - case "StrictKernelModePolicyTime": - newValue = StrictKernelModePolicyTimeTextBox.Text; - break; default: break; } @@ -341,8 +337,7 @@ private void EditButton_Click(object sender, RoutedEventArgs e) UnsignedPolicyPath: string.Equals(fieldName, "UnsignedPolicyPath", StringComparison.OrdinalIgnoreCase) ? newValue : null, SignToolCustomPath: string.Equals(fieldName, "SignToolCustomPath", StringComparison.OrdinalIgnoreCase) ? newValue : null, CertificateCommonName: string.Equals(fieldName, "CertificateCommonName", StringComparison.OrdinalIgnoreCase) ? newValue : null, - CertificatePath: string.Equals(fieldName, "CertificatePath", StringComparison.OrdinalIgnoreCase) ? newValue : null, - StrictKernelModePolicyTimeOfDeployment: string.Equals(fieldName, "StrictKernelModePolicyTime", StringComparison.OrdinalIgnoreCase) ? TryParseDateTime(newValue) : null + CertificatePath: string.Equals(fieldName, "CertificatePath", StringComparison.OrdinalIgnoreCase) ? newValue : null ); Logger.Write($"Edited {fieldName} to {newValue}"); @@ -355,14 +350,11 @@ private void ClearButton_Click(object sender, RoutedEventArgs e) string? fieldName = button!.Tag.ToString(); UserConfiguration.Remove( - string.Equals(fieldName, "SignedPolicyPath", StringComparison.OrdinalIgnoreCase), - string.Equals(fieldName, "UnsignedPolicyPath", StringComparison.OrdinalIgnoreCase), - string.Equals(fieldName, "SignToolCustomPath", StringComparison.OrdinalIgnoreCase), - string.Equals(fieldName, "CertificateCommonName", StringComparison.OrdinalIgnoreCase), - string.Equals(fieldName, "CertificatePath", StringComparison.OrdinalIgnoreCase), - string.Equals(fieldName, "StrictKernelPolicyGUID", StringComparison.OrdinalIgnoreCase), - string.Equals(fieldName, "StrictKernelNoFlightRootsPolicyGUID", StringComparison.OrdinalIgnoreCase), - string.Equals(fieldName, "StrictKernelModePolicyTime", StringComparison.OrdinalIgnoreCase) + SignedPolicyPath: string.Equals(fieldName, "SignedPolicyPath", StringComparison.OrdinalIgnoreCase), + UnsignedPolicyPath: string.Equals(fieldName, "UnsignedPolicyPath", StringComparison.OrdinalIgnoreCase), + SignToolCustomPath: string.Equals(fieldName, "SignToolCustomPath", StringComparison.OrdinalIgnoreCase), + CertificateCommonName: string.Equals(fieldName, "CertificateCommonName", StringComparison.OrdinalIgnoreCase), + CertificatePath: string.Equals(fieldName, "CertificatePath", StringComparison.OrdinalIgnoreCase) ); switch (fieldName) @@ -382,9 +374,6 @@ private void ClearButton_Click(object sender, RoutedEventArgs e) case "CertificatePath": CertificatePathTextBox.Text = string.Empty; break; - case "StrictKernelModePolicyTime": - StrictKernelModePolicyTimeTextBox.Text = string.Empty; - break; default: break; } diff --git a/AppControl Manager/Pages/StrictKernelPolicyScanResults.xaml b/AppControl Manager/Pages/StrictKernelPolicyScanResults.xaml index 11d830bcc..f3f38363d 100644 --- a/AppControl Manager/Pages/StrictKernelPolicyScanResults.xaml +++ b/AppControl Manager/Pages/StrictKernelPolicyScanResults.xaml @@ -37,7 +37,7 @@ - + View the detected Kernel-mode files that will be used to create the enforced mode policy. Remove items you don't want to be included in the final Strict Kernel-mode policy from the list.