Skip to content

Commit

Permalink
Fix /store handling oversight
Browse files Browse the repository at this point in the history
  • Loading branch information
thebookisclosed committed Jun 28, 2022
1 parent 8ac9d4a commit 4edf9f1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
12 changes: 8 additions & 4 deletions ViVeTool/Program.cs
Expand Up @@ -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":
Expand Down Expand Up @@ -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);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions ViVeTool/Properties/AssemblyInfo.cs
Expand Up @@ -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")]
17 changes: 12 additions & 5 deletions ViVeTool/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion ViVeTool/Properties/Resources.resx
Expand Up @@ -117,8 +117,11 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BootStoreRebootTip" xml:space="preserve">
<value>Boot store changes require a reboot to fully take effect, please do so if a configuration appears to be missing</value>
</data>
<data name="Branding" xml:space="preserve">
<value>ViVeTool v0.3.0 - Windows feature configuration tool
<value>ViVeTool v0.3.1 - Windows feature configuration tool
</value>
</data>
<data name="ChangestampDisplay" xml:space="preserve">
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4edf9f1

Please sign in to comment.