Attribute VB_Name = "DisableLockScreenRegCheck"
Option Explicit

Public Sub DisableLockScreenRegCheck()
    Dim wsh As Object
    Dim regPath As String
    Dim value As Variant

    Set wsh = CreateObject("WScript.Shell")
    regPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization\NoLockScreen"

    On Error Resume Next
    value = wsh.RegRead(regPath)
    On Error GoTo 0

    If IsEmpty(value) Then
        MsgBox "Value not set:" & vbCrLf & regPath, vbExclamation, "Disable Lock Screen"
    Else
        MsgBox "Disable Lock Screen" & vbCrLf & regPath & " = " & value, vbInformation
    End If
End Sub