stop your computer from locking


cokedude

Member
Local time
3:08 AM
Posts
17
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

System One

  • OS
    10 and 11
    Computer type
    Laptop
 

My Computer

System One

  • 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