Categories
Welcome Center
Education & Development
Cyber Security
Virtualization
General
Certification Preparation
Project Management
Posts
Groups
Training Resources
Infosec
IT & Security Bootcamps
Practice Exams
Security Awareness Training
About Us
Home
General
Off-Topic
Script to Lock computer after idle for x minutes
qwertyiop
I haven't worked with batch files in a longtime so I'm hoping to get some help from the community.
I have a batch script that needs to execute something after the computer has been idle for x minutes I just can't figure out how to tell if the computer isn't being used.
*Note - These computers aren't on my domain.
Find more posts tagged with
Comments
ptilsen
Task scheduler will detect the idle state and trigger an action on it. If you need an additional arbitrary wait time to execute something, use the timeout command.
apr911
What exactly are you trying to do? Your topic title suggests you are trying to lock a computer after being idle which, even if the computers are not on a domain, can be down via the GPO on the local machine. A domain just allows for centralized management of the GPO and GPO enforcement but there is nothing wrong with deploying a GPO to non-domain computers. Just be aware admin users on the local machine can modify the GPO settings themselves.
If you're trying to do something else when the computer is idle, well I guess that depends on what you are trying to do because there are varying levels of "idle"
Qord
You could powershell it:
Hey, Scripting Guy! How Can I Run a Script When My Computer Is Idle? - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of