📊 VBA (Excel)

Apply Disable Lock Screen (VBA)

Skips straight to the sign-in screen instead of showing the lock screen (requires admin). Applied via WScript.Shell.RegWrite from VBA. Requires an elevated (Administrator) prompt.

By WindowsScripting.com · 419 B
DisableLockScreenRegSet.bas
Attribute VB_Name = "DisableLockScreenRegSet"
Option Explicit

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

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

    wsh.RegWrite regPath, 1, "REG_DWORD"

    MsgBox "Disable Lock Screen applied." & vbCrLf & regPath, vbInformation
End Sub