What Are the Patch Types Available in Wand-Enhancer? A Complete Guide
Wand-Enhancer provides five distinct patch types—ActivatePro, DisableUpdates, DisableTelemetry, DevToolsOnF12, and RemoteWebPanelPreview—that modify the Wand client's behavior by patching ASAR files to enable Pro features, block updates, disable analytics, unlock developer tools, and embed remote control interfaces.
Wand-Enhancer is an open-source modification framework for the Wand application that applies runtime patches to the client's ASAR bundle. The patch types available in Wand-Enhancer are defined in the EPatchType enum and determine exactly which behavioral modifications are injected during the patching process.
Overview of Wand-Enhancer Patch Types
The patch system is controlled through PatchConfig.cs, where the EPatchType enum (lines 9-16) declares the available modifications. Each patch type corresponds to specific JavaScript replacements or injections that alter the original Wand client's functionality.
Detailed Breakdown of Each Patch Type
ActivatePro
ActivatePro forces the user account to appear as a Pro subscription persistently. According to the source code in AGENTS.md, this patch rewrites three account-related service methods—getUserAccount, setAccountWandBrandExperience, and setAccountLanguage—plus the ACTION_SET_ACCOUNT reducer. This ensures the account.subscription object is always present in API responses, maintaining Pro status across language changes and account refreshes.
DisableUpdates
DisableUpdates prevents Wand's automatic update check and download routine. The patch replaces the updater service with a no-op implementation, blocking network requests to the update server. This registration occurs in EnhancerConfig.GetInstance() at line 188 of WandEnhancer/Core/EnhancerConfig.cs.
DisableTelemetry
DisableTelemetry turns off all telemetry and analytics reporting. Similar to the update patch, this applies a no-op rewrite to telemetry sender methods, ensuring no usage data reaches Wand's telemetry endpoints.
DevToolsOnF12
DevToolsOnF12 enables Chrome DevTools when pressing F12 inside the Electron application. Unlike renderer-process modifications, this patch adds a before-input-event listener in the Electron main process, making it stable across Wand releases. The implementation details are documented in AGENTS.md under the DevToolsOnF12 section.
RemoteWebPanelPreview
RemoteWebPanelPreview embeds a lightweight remote web-panel UI into Wand's ASAR bundle. This patch injects bridge.cjs and default renderer scripts into resources/app.asar under remote-panel/, providing QR-code remote control, trainer launch shortcuts, and a mini-dashboard interface.
How Patch Selection Works in the Code
Users select patches through the Patch Vectors popup UI, which constructs a HashSet<EPatchType> stored in PatchConfig.json. The configuration object specifies which patches to apply during the next run.
Example configuration:
// Example: Creating a PatchConfig JSON that enables Pro + DevTools
var config = new PatchConfig {
Path = @"C:\Program Files\Wand", // Wand installation folder
AutoApplyPatches = true,
PatchTypes = new HashSet<EPatchType> {
EPatchType.ActivatePro,
EPatchType.DevToolsOnF12
},
CustomScriptPaths = new List<string>() // optional custom renderer scripts
};
File.WriteAllText("PatchConfig.json", JsonConvert.SerializeObject(config, Formatting.Indented));
The UI logic in PatchVectorsPopup.xaml.cs maps checkboxes to enum values:
// Inside the UI (PatchVectorsPopup.xaml.cs) – how the check-boxes translate to EPatchType
if (ActivateProBox.IsChecked == true) result.Add(EPatchType.ActivatePro);
if (DisableUpdateBox.IsChecked == true) result.Add(EPatchType.DisableUpdates);
if (DevToolsBox.IsChecked == true) result.Add(EPatchType.DevToolsOnF12);
if (RemotePanelBox.IsChecked == true) result.Add(EPatchType.RemoteWebPanelPreview);
Key Source Files and Architecture
Understanding the patch types available in Wand-Enhancer requires familiarity with these core files:
-
WandEnhancer/Models/PatchConfig.cs– Defines theEPatchTypeenum and the serializable configuration object used to persist user selections. -
WandEnhancer/Core/EnhancerConfig.cs– Registers concrete patch entries including JavaScript file paths and replacement logic for eachEPatchTypevalue. -
WandEnhancer/Core/Enhancer.cs– The core engine that readsPatchConfig, filters enabled patches, and performs the actual ASAR file modifications. -
WandEnhancer/View/Popups/PatchVectorsPopup.xaml.cs– The WPF dialog where users select patches; responsible for building theHashSet<EPatchType>saved to the configuration file. -
AGENTS.md– Comprehensive documentation of the patch pipeline, including detailed technical explanations of how each patch modifies the Wand client.
Summary
-
Five patch types are available: ActivatePro, DisableUpdates, DisableTelemetry, DevToolsOnF12, and RemoteWebPanelPreview.
-
EPatchType enum in
PatchConfig.csserves as the authoritative registry of available modifications. -
ASAR patching occurs through the
Enhancer.csengine, which selectively applies JavaScript replacements based on theHashSet<EPatchType>stored inPatchConfig.json. -
Patch persistence is handled via JSON serialization, with the UI layer in
PatchVectorsPopup.xaml.csmanaging user input translation to enum values. -
Stability features like the main-process DevTools hook ensure patches remain functional across Wand application updates.
Frequently Asked Questions
What is EPatchType in Wand-Enhancer?
EPatchType is a C# enum defined in WandEnhancer/Models/PatchConfig.cs that declares the available modification types. It acts as the type-safe identifier system for patches, allowing the configuration engine to determine which ASAR modifications to apply during the enhancement process.
How do I enable multiple patches at once?
Create a HashSet<EPatchType> containing all desired values and assign it to the PatchTypes property of your PatchConfig object. The Wand-Enhancer UI simplifies this by providing checkboxes in the Patch Vectors popup that automatically populate this set before serializing to PatchConfig.json.
Where are the patch configurations stored?
User selections are persisted in a file named PatchConfig.json in the application's working directory. This JSON file contains the serialized PatchConfig object, including the installation path, auto-apply settings, and the set of enabled EPatchType values.
Is patching the Wand client reversible?
Yes, because Wand-Enhancer works by modifying ASAR archives, you can restore the original client by verifying or reinstalling the application through the original installer. The patcher creates backups or works on copies depending on your configuration, allowing rollback by disabling patches and re-applying to generate a clean ASAR bundle.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →