you’ve got the option to do it with the screen saver options.

The screensaver works when your box is inactive for the set time.

Lets learnHow to lock computer after few minutes of inactivityin Windows 10 automatically.

go to personalize windows 10

How to set your machine to auto lock after few minutes of inactive screen.

There is an option to set the time for the lock screen.

The computer will be locked after pass this time.

screen saver windows 10

The same time setting will be applied for the screensaver as well.

If you want to keep your screensaver of it’s possible for you to set it to none.

How to lock the computer screen after timeout.

lock screen settingwindows 10

How to set the Timeout options to lock the computer.

This automatic lock the computer screen option is very useful.

right click on desktop windows 7

Screenscaver windows 7

lock screen setting windows 7