đź“„ JScript (WSH)

Enable Light Mode (JScript)

Reverts File Explorer and other system surfaces to light mode. Applies the tweak via WScript.Shell.RegWrite (JScript syntax).

By WindowsScripting.com · 594 B
SetLightMode.js
// ============================================================
// SetLightMode.js
//
// Enable Light Mode.
// Reverts File Explorer and other system surfaces to light mode.
//
// Usage: cscript SetLightMode.js
// ============================================================

var objShell = WScript.CreateObject("WScript.Shell");

try {
    objShell.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize\\AppsUseLightTheme", 1, "REG_DWORD");
    WScript.Echo("Enable Light Mode applied.");
} catch (e) {
    WScript.Echo("Failed to apply tweak: " + e.description);
}