Attribute VB_Name = "DisableWindowsSpotlightRegSet"
Option Explicit

Public Sub DisableWindowsSpotlightRegSet()
    Dim wsh As Object
    Dim regPath As String

    Set wsh = CreateObject("WScript.Shell")
    regPath = "HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CloudContent\DisableSpotlightCollectionOnDesktop"

    wsh.RegWrite regPath, 1, "REG_DWORD"

    MsgBox "Disable Windows Spotlight on Desktop applied." & vbCrLf & regPath, vbInformation
End Sub