Back to Powertoys

Registry Plugin

doc/devdocs/modules/launcher/plugins/registry.md

0.98.15.0 KB
Original Source

Registry Plugin

The registry plugin allows users to search the Windows registry.

Special functions (differ from the regular functions)

  • Support full base keys and short base keys (e.g. HKLM for HKEY_LOCALE_MACHINE).
  • Show count of subkeys and count of values in the second result line.
  • Search for value names and value data inside a registry key (syntax: [RegistryKey]\\[ValueName] and [RegistryKey]\\[ValueData])

The Windows Registry

The registry contains all settings for the Windows operating system and many settings of the installed (Windows only) programs.

Note: Linux and macOS program ports typical store the settings in their own configuration files and not in the Windows registry.

For more information about the Windows registry, see the official documentation.

For advanced information about the Windows registry, see Windows registry information for advanced users.

Score

The score is currently not set on the results.

Important for developers

General

  • The assembly name is cached into _assemblyName (to avoid to many calls of Assembly.GetExecutingAssembly())

Results

  • All results override the visible search result via QueryTextDisplay to avoid problems with short registry base keys (e.g. HKLM).
  • The length of a Title and Subtitle is automatic truncated, when it is to long.

Microsoft.Plugin.Registry project

Important plugin values (meta-data)

NameValue
ActionKeyword:
ExecuteFileNameMicrosoft.PowerToys.Run.Plugin.Registry.dll
ID303417D927BF4C97BCFFC78A123BE0C8

Interfaces used by this plugin

The plugin use only these interfaces (all inside the Main.cs):

  • Wox.Plugin.IPlugin
  • Wox.Plugin.IContextMenu
  • Wox.Plugin.IPluginI18n
  • System.IDisposable

Program files

FileContent
Classes\RegistryEntry.csWrapper class for a registry key with a possible exception on access
Constants\KeyName.csStatic used short registry key names (to avoid code and string doubling)
Constants\MaxTextLength.csContain all maximum text lengths (for truncating)
Enumeration\TruncateSide.csContain the possible truncate sides
Helper\ContextMenuHelper.csAll functions to build the context menu (for each result entry)
Helper\QueryHelper.csAll functions to analyze the search query
Helper\RegistryHelper.csAll functions to search into the Windows registry (via Win32.Registry)
Helper\ResultHelper.csAll functions to convert internal results into WOX results
Helper\ValueHelper.csAll functions to convert values into human readable values
Images\reg.dark.pngSymbol for the results for the dark theme
Images\reg.light.pngSymbol for the results for the light theme
Properties\Resources.Designer.resxFile that contain all translatable keys
Properties\Resources.resxFile that contain all translatable strings in the neutral language
Main.csMain class, the only place that implement the WOX interfaces
plugin.jsonAll meta-data for this plugin

Important project values (*.csproj)

NameValue
TargetFrameworknet6.0-windows (.NET 5) or net6.0-windows10.0.19041.0 (OS version specific)
LangVersion8.0 (mean C# 8.0)
Platformsx64
Nullabletrue
Output..\..\..\..\..\x64\Debug\modules\launcher\Plugins\Microsoft.Plugin.Registry\
RootNamespaceMicrosoft.PowerToys.Run.Plugin.Registry
AssemblyNameMicrosoft.PowerToys.Run.Plugin.Registry

Project dependencies

Projects

  • Wox.Infrastructure
  • Wox.Plugin