MetadataEditor is a professional Windows system utility for viewing and editing file metadata (Windows Property System) and Alternative Data Streams (ADS). It is designed to bridge the gap between low-level Win32 APIs and a modern, high-performance UI.
The goal of MetadataEditor is to provide surgical control over file-attached data that is typically hidden or difficult to access through standard Windows Explorer interfaces.
The solution is divided into three distinct modules to ensure a clean separation of concerns and maximum performance.
The WinForms frontend. It handles user interactions, property editing, and process management. It supports specialized "Picker" modes (-pick) for integration with third-party automation scripts.
The core logic library. It contains zero UI code and communicates directly with the Windows Operating System using P/Invoke (Platform Invocation Services) and COM Interop.
A SharpShell-powered library that injects MetadataEditor functionality directly into the Windows Shell via the Property Sheet ("Metadata" tab) and Global Context Menu.
MetadataEditor uses the modern Windows Property System (propsys.dll).
- Property Discovery: The engine performs an asynchronous scan of up to 800 shell property indices using
folder.GetDetailsOf. - Schema Caching: Discovered property indices are cached at
%AppData%\MetadataEditor\property_cache.txt. This ensures that subsequent loads are instantaneous while still allowing for background updates if the system schema changes. - Property Writing: Edits are committed via
IPropertyStore.SetValueandIPropertyStore.Commit, ensuring metadata changes are fully indexed by Windows Search.
NTFS allows files to have multiple data streams beyond the default $DATA stream.
- Enumeration: Uses
FindFirstStreamWto locate all alternate streams attached to a file. - Manipulation: Uses
CreateFileWwith the:streamnamesuffix to perform standard Read/Write operations on these hidden channels. - Custom Fields: The "Add Custom ADS Field" feature allows users to attach arbitrary string data to any file without modifying the primary file content.
To ensure the UI is never blocked, MetadataEditor uses a two-stage loading process:
- Stage 1 (Instant): The PropertyGrid is immediately populated with properties found in the persistent schema cache and standard file attributes.
- Stage 2 (Background): A background thread performs a deep scan of the target file's properties. As new information is found, the
SchemaUpdatedevent is fired, and thePropertyGridis refreshed to "fill in" the discovered fields.
The application uses a "Unified Teal Structural Theme":
- Category Headers: White text on a Teal background (via
CategorySplitterColor). - Grid Lines: Dark Grey (
DimGray). - OS-Native Rendering: The form itself respects the user's OS theme (Dark/Light mode), while the PropertyGrid retains specialized branding accents for clarity.
The Shell Extension injects a custom tab into the standard Windows Properties dialog. This tab uses the same asynchronous engine as the main app, allowing for deep metadata inspection without hanging explorer.exe.
The "Open in Metadata Editor" entry allows for instant deep-dive analysis of any file or folder on the system.
For automation developers, the -pick and -pick_advanced flags transform the UI into a modal dialog that returns the selected property index to STDOUT upon closing.
The project uses backup_and_build.ps1 for CI/CD:
- Build: Compiles both x86 and x64 targets.
- Backup: Creates a timestamped CAB archive of the source code.
- Installer: Generates a native Inno Setup installer that handles COM registration and Explorer restarts.
© 2026 EliteSoftwareTech Co.
Author: Zachary Whiteman