' ============================================================
' CheckDisableWebSearchStatus.vbs
'
' Checks whether "Disable Start Menu Web Search" is currently applied.
'
' Usage: cscript CheckDisableWebSearchStatus.vbs
' ============================================================

Option Explicit

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

On Error Resume Next
currentValue = objShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Search\BingSearchEnabled")

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