stop your computer from locking


cokedude

Active member
Member
Local time
7:38 PM
Posts
61
OS
10 and 11
This is a useful trick to stop your computer from locking.

Code:
param($minutes = 9999)

write "... screen will be awake for $minutes"

 $myshell = New-Object -com "Wscript.Shell"

 for ($i = 0; $i -lt $minutes; $i++) {
 write "... screen will be awake for" ($minutes-$i)
 Start-Sleep -Seconds 60   
 $myshell.sendkeys("{NUMLOCK}{NUMLOCK}")
}
 

My Computer My Computer

At a glance

10 and 11
OS
10 and 11
Computer type
Laptop
 

My Computer My Computer

At a glance

Windows 11AMD Ryzen 7 5700GMicron Technology DDR4-3200 16GBNVIDIA GeForce RTX 3060
OS
Windows 11
Computer type
PC/Desktop
Manufacturer/Model
HP Pavilion
CPU
AMD Ryzen 7 5700G
Motherboard
Erica6
Memory
Micron Technology DDR4-3200 16GB
Graphics Card(s)
NVIDIA GeForce RTX 3060
Sound Card
Realtek ALC671
Monitor(s) Displays
Samsung SyncMaster U28E590
Screen Resolution
3840 x 2160
Hard Drives
SAMSUNG MZVLQ1T0HALB-000H1

Latest Support Threads

Back
Top Bottom