📜 VBScript (WSH)

Disable Lock Screen (VBScript)

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

By WindowsScripting.com · 755 B
SetDisableLockScreen.vbs
' ============================================================
' SetDisableLockScreen.vbs
'
' Disable Lock Screen.
' Skips straight to the sign-in screen instead of showing the lock screen (requires admin). Requires an elevated (Administrator) prompt.
'
' Usage: cscript SetDisableLockScreen.vbs
' ============================================================

Option Explicit

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

On Error Resume Next
objShell.RegWrite "HKLM\SOFTWARE\Policies\Microsoft\Windows\Personalization\NoLockScreen", 1, "REG_DWORD"

If Err.Number = 0 Then
    WScript.Echo "Disable Lock Screen applied."
Else
    WScript.Echo "Failed to apply tweak (Error " & Err.Number & ": " & Err.Description & ")"
End If
On Error Goto 0