Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 669
  • Last Modified:

How to shutdown laptop when locked and lid is closed

I'm trying to get Win 7 to shutdown when the laptop lid is closed, this is easy. But I need it to also shutdown if a user is logged in and locked. And ultimately set this up in a GP.
0
nac_
Asked:
nac_
  • 4
  • 2
  • 2
  • +1
1 Solution
 
dmeerenCommented:
Why not use the shutdown command that is present in the dos prompt?
0
 
PenguinNCommented:
Use the shutdown command, to shutdown a computer "shutdown /m \\computername /f /s" for a GP i think you don't have any options because your policies get applied when you logon.
 
0
 
Joseph DalyCommented:
Assuming you have admin rights

shutdown -s  -m \\computername -t 0 -f
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Joseph DalyCommented:
Or even easier use

shutdown /i

and select the computer you want to shut down from the GUI.
0
 
nac_Author Commented:
Ok, but the point is for Win to shutdown when the lid is closed and workstation is already locked.

So a user uses the computer, walks away, screen saver locks the computer in 10 min, then user comes back and closes the lid to put computer away. This is when I want it to shutdown. (not sleep or hibernate)

I realize shutdown -s -f will do it, but how do I trigger that on lid close?
0
 
dmeerenCommented:
Is it windows 7, i beleave you can make a task that run's when the users is inactive for a period of time? I don;t think it possible to detect when a computer is beeing put away.

And then you can run shutdown
0
 
dmeerenCommented:
And why not change the power scheme to always shutdown instead of hibernate? Start --> Configuration --> Power (Or Enegery) --> cycle through the tab's and there is one where you can change the action when lid is closed, etc...
0
 
nac_Author Commented:
shutdown.exe on idle is the only way I can get it to shutdown when the computer is locked. I have it set to shutdown when lid is closed but this doesn't work when locked.
0
 
dmeerenCommented:
Okay, nice to know that one!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now