This script is used to schedule a task to check,if internet connection is available or not and lock windows if there is no internet connection available.
Scheduled task will be created to continously monitor every five minutes.
Please run the script as Loggedin user
Refer the below link
https://scripts.comodo.com/frontend/web/topic/set-windows-to-lock-itself-upon-timeout-if-no-internet-connection-found-security-measure