đź“„ JScript (WSH)

Disable Windows Spotlight on Desktop (JScript)

Turns off the Windows Spotlight rotating desktop background feature. Applies the tweak via WScript.Shell.RegWrite (JScript syntax).

By WindowsScripting.com · 671 B
SetDisableWindowsSpotlight.js
// ============================================================
// SetDisableWindowsSpotlight.js
//
// Disable Windows Spotlight on Desktop.
// Turns off the Windows Spotlight rotating desktop background feature.
//
// Usage: cscript SetDisableWindowsSpotlight.js
// ============================================================

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

try {
    objShell.RegWrite("HKCU\\Software\\Policies\\Microsoft\\Windows\\CloudContent\\DisableSpotlightCollectionOnDesktop", 1, "REG_DWORD");
    WScript.Echo("Disable Windows Spotlight on Desktop applied.");
} catch (e) {
    WScript.Echo("Failed to apply tweak: " + e.description);
}