📜 VBScript (WSH)
Enable Dark Mode (VBScript)
Switches File Explorer and other system surfaces to dark mode. Applies the tweak via WScript.Shell.RegWrite.
SetDarkMode.vbs
' ============================================================
' SetDarkMode.vbs
'
' Enable Dark Mode.
' Switches File Explorer and other system surfaces to dark mode.
'
' Usage: cscript SetDarkMode.vbs
' ============================================================
Option Explicit
Dim objShell
Set objShell = CreateObject("WScript.Shell")
On Error Resume Next
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme", 0, "REG_DWORD"
If Err.Number = 0 Then
WScript.Echo "Enable Dark Mode applied."
Else
WScript.Echo "Failed to apply tweak (Error " & Err.Number & ": " & Err.Description & ")"
End If
On Error Goto 0