0

I'm using the steps below from here and here to Autologin and Lock the Screen on Windows 10.

However there is a pause of around 10 seconds where you can see the desktop and a bad actor could potentialy run a script to cancel the Lock Screen or transfer data.

Is there any way to move the Screen Lock up the priority so that it happens immediately after logon?

If not could you alternatively prevent mouse/keyboard input for X seconds after logon?

Step 1: Open notepad, then paste this code:
WScript.CreateObject("WScript.Shell").Run("rundll32 user32.dll,LockWorkStation")

Step 2: Click File>Save As and in Save as type dropdown menu, choose All Files

Step 3: In the File Name field, enter LockWorkStation.vbs and save the file to C:\Users\YourUserName\Documents

Step 4: Open a new document in notepad and then paste this code:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "RunLogonScriptSync"=dword:00000001

Step 5: Save this new file as RunLogonScriptSync=1.reg as described in steps 2 & 3.

Step 6: Import this reg-file into the registry by making a doubleclick on it.

Step 7: Hit WindowsKey+R, type gpedit.msc and press ENTER

Step 8: Under Computer Configuration, go to Administrative Templates > System > Logon then Double Click Run these programs at user logon

Step 9: Click Enabled, and on Items to run at logon click Show...

Step 10: Type C:\Users\YourUserName\Documents\LockWorkStation.vbs and click OK repeatedly until all windows are closed

Step 11: Hit WindowsKey+R and type control.exe userpasswords2 then press ENTER

Step 12: Uncheck Users must enter a user name and password to use this computer. then click OK (type in your password if it prompts to do so)

Step 13: Restart your PC.

Now whenever you start your PC, the .vbs script will run first before anything else. This will ensure that your PC is locked before the desktop appears.

Marcus
  • 103

0 Answers0