📜 VBScript (WSH)

Check "Disable Lock Screen Notifications" Status (VBScript)

Reads the registry value behind the "Disable Lock Screen Notifications" tweak to confirm whether it's applied.

By WindowsScripting.com · 765 B
CheckDisableLockScreenNotificationsStatus.vbs
' ============================================================
' CheckDisableLockScreenNotificationsStatus.vbs
'
' Checks whether "Disable Lock Screen Notifications" is currently applied.
'
' Usage: cscript CheckDisableLockScreenNotificationsStatus.vbs
' ============================================================

Option Explicit

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

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

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