' ============================================================
' SetLightMode.vbs
'
' Enable Light Mode.
' Reverts File Explorer and other system surfaces to light mode.
'
' Usage: cscript SetLightMode.vbs
' ============================================================

Option Explicit

Dim objShell
Set objShell = CreateObject("WScript.Shell")

On Error Resume Next
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme", 1, "REG_DWORD"

If Err.Number = 0 Then
    WScript.Echo "Enable Light Mode applied."
Else
    WScript.Echo "Failed to apply tweak (Error " & Err.Number & ": " & Err.Description & ")"
End If
On Error Goto 0