自动登录后更快锁定屏幕

自动登录后更快锁定屏幕

我正在使用以下步骤这里这里在 Windows 10 上自动登录并锁定屏幕。

然而,在这段时间内您可以看到桌面,大约有 10 秒钟的暂停时间,并且不良行为者可能会运行脚本来取消锁定屏幕或传输数据。

有什么方法可以提高屏幕锁定的优先级,以便它在登录后立即发生?

如果不行的话,您是否可以在登录后 X 秒内阻止鼠标/键盘输入?

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.

相关内容