From 4edf9f14a3eeeec061cb48ad167c8095f2885b3c Mon Sep 17 00:00:00 2001 From: Lucas <13197516+thebookisclosed@users.noreply.github.com> Date: Tue, 28 Jun 2022 09:35:54 +0200 Subject: [PATCH] Fix /store handling oversight --- ViVeTool/Program.cs | 12 ++++++++---- ViVeTool/Properties/AssemblyInfo.cs | 4 ++-- ViVeTool/Properties/Resources.Designer.cs | 17 ++++++++++++----- ViVeTool/Properties/Resources.resx | 9 ++++++++- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/ViVeTool/Program.cs b/ViVeTool/Program.cs index 85aea28..baafde4 100644 --- a/ViVeTool/Program.cs +++ b/ViVeTool/Program.cs @@ -65,15 +65,15 @@ static void ProcessArgs(string[] args) HandleQuery(); break; case "/enable": - ArgumentBlock.Initialize(args, ArgumentBlockFlags.Identifiers | ArgumentBlockFlags.FeatureConfigurationProperties | ArgumentBlockFlags.AllowBothStoresArgument); + ArgumentBlock.Initialize(args, ArgumentBlockFlags.Store | ArgumentBlockFlags.Identifiers | ArgumentBlockFlags.FeatureConfigurationProperties | ArgumentBlockFlags.AllowBothStoresArgument); HandleSet(RTL_FEATURE_ENABLED_STATE.Enabled); break; case "/disable": - ArgumentBlock.Initialize(args, ArgumentBlockFlags.Identifiers | ArgumentBlockFlags.FeatureConfigurationProperties | ArgumentBlockFlags.AllowBothStoresArgument); + ArgumentBlock.Initialize(args, ArgumentBlockFlags.Store | ArgumentBlockFlags.Identifiers | ArgumentBlockFlags.FeatureConfigurationProperties | ArgumentBlockFlags.AllowBothStoresArgument); HandleSet(RTL_FEATURE_ENABLED_STATE.Disabled); break; case "/reset": - ArgumentBlock.Initialize(args, ArgumentBlockFlags.Identifiers | ArgumentBlockFlags.Priority | ArgumentBlockFlags.AllowBothStoresArgument); + ArgumentBlock.Initialize(args, ArgumentBlockFlags.Store | ArgumentBlockFlags.Identifiers | ArgumentBlockFlags.Priority | ArgumentBlockFlags.AllowBothStoresArgument); HandleReset(); break; case "/fullreset": @@ -203,7 +203,11 @@ static void HandleQuery() PrintFeatureConfig(config.Value, name); } else - ConsoleEx.WriteErrorLine(Properties.Resources.SingleQueryFailed, id, ArgumentBlock.Store); + { + ConsoleEx.WriteErrorLine(Properties.Resources.SingleQueryFailed, id, storeToUse); + if (storeToUse == RTL_FEATURE_CONFIGURATION_TYPE.Boot) + ConsoleEx.WriteWarnLine(Properties.Resources.BootStoreRebootTip); + } } } diff --git a/ViVeTool/Properties/AssemblyInfo.cs b/ViVeTool/Properties/AssemblyInfo.cs index 4500cb2..5642298 100644 --- a/ViVeTool/Properties/AssemblyInfo.cs +++ b/ViVeTool/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.3.0.0")] -[assembly: AssemblyFileVersion("0.3.0.0")] +[assembly: AssemblyVersion("0.3.1.0")] +[assembly: AssemblyFileVersion("0.3.1.0")] diff --git a/ViVeTool/Properties/Resources.Designer.cs b/ViVeTool/Properties/Resources.Designer.cs index 61a80e3..f6df95d 100644 --- a/ViVeTool/Properties/Resources.Designer.cs +++ b/ViVeTool/Properties/Resources.Designer.cs @@ -61,7 +61,16 @@ internal class Resources { } /// - /// Looks up a localized string similar to ViVeTool v0.3.0 - Windows feature configuration tool + /// Looks up a localized string similar to Boot store changes require a reboot to fully take effect, please do so if a configuration appears to be missing. + /// + internal static string BootStoreRebootTip { + get { + return ResourceManager.GetString("BootStoreRebootTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ViVeTool v0.3.1 - Windows feature configuration tool ///. /// internal static string Branding { @@ -392,10 +401,8 @@ internal class Resources { ///You can specify feature IDs or names to filter the query results, in this case only ///the override with the highest priority will be displayed. /// - ///Examples: - /// /query - /// /query /store:boot /id:12345678 - /// /query /store:runtime /name:TIFE,STTest. + ///Boot store queries reflect the state on system startup, if you've made any changes + ///to it since, a reboot is required for them to show up in the output. This is intend [rest of string was truncated]";. /// internal static string Help_Query { get { diff --git a/ViVeTool/Properties/Resources.resx b/ViVeTool/Properties/Resources.resx index 93d1777..a5086f8 100644 --- a/ViVeTool/Properties/Resources.resx +++ b/ViVeTool/Properties/Resources.resx @@ -117,8 +117,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Boot store changes require a reboot to fully take effect, please do so if a configuration appears to be missing + - ViVeTool v0.3.0 - Windows feature configuration tool + ViVeTool v0.3.1 - Windows feature configuration tool @@ -290,6 +293,10 @@ If no store is specified, the Runtime store will be queried by default. You can specify feature IDs or names to filter the query results, in this case only the override with the highest priority will be displayed. +Boot store queries reflect the state on system startup, if you've made any changes +to it since, a reboot is required for them to show up in the output. This is intended +as it reflects what the Windows API sees when querying particular feature stores. + Examples: /query /query /store:boot /id:12345678