Search for regedit and run command
– Double-click to expand HKEY_LOCAL_MACHINE in the left pane.
– Double-click to expand SOFTWARE.
– Double-click to expand Policies.
– Double-click to expand Microsoft.
Now, don’t double-click but right-click Windows.
Click New and then click Key.
Rename New Key #1 that you just created as Personalization and hit Enter
In the Personalization folder, right-click in the right pane of the Registry Editor, select New and then select DWORD (32-bit) Value. You will see a new item pop-up in the right pane of the Registry Editor, titled New Value #1. Rename it as NoLockScreen and hit Enter.
Double-click NoLockScreen to open its value data. Under Value data, change the value from 0 to 1 and click OK.