📜 VBScript (WSH)

Check "Disable Windows Spotlight on Desktop" Status (VBScript)

Reads the registry value behind the "Disable Windows Spotlight on Desktop" tweak to confirm whether it's applied.

By WindowsScripting.com · 782 B
CheckDisableWindowsSpotlightStatus.vbs
' ============================================================
' CheckDisableWindowsSpotlightStatus.vbs
'
' Checks whether "Disable Windows Spotlight on Desktop" is currently applied.
'
' Usage: cscript CheckDisableWindowsSpotlightStatus.vbs
' ============================================================

Option Explicit

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

On Error Resume Next
currentValue = objShell.RegRead("HKCU\Software\Policies\Microsoft\Windows\CloudContent\DisableSpotlightCollectionOnDesktop")

If Err.Number <> 0 Then
    WScript.Echo "'DisableSpotlightCollectionOnDesktop' is not set (using the Windows default)."
Else
    WScript.Echo "Current value of 'DisableSpotlightCollectionOnDesktop': " & currentValue
End If
On Error Goto 0