Solved

How to shutdown laptop when locked and lid is closed

Posted on 2010-11-16
9
664 Views
Last Modified: 2012-05-10
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
Comment
Question by:nac_
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 8

Expert Comment

by:dmeeren
ID: 34149213
Why not use the shutdown command that is present in the dos prompt?
0
 
LVL 8

Expert Comment

by:PenguinN
ID: 34149240
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
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 34149245
Assuming you have admin rights

shutdown -s  -m \\computername -t 0 -f
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 35

Expert Comment

by:Joseph Daly
ID: 34149258
Or even easier use

shutdown /i

and select the computer you want to shut down from the GUI.
0
 

Author Comment

by:nac_
ID: 34149413
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
 
LVL 8

Accepted Solution

by:
dmeeren earned 500 total points
ID: 34152712
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
 
LVL 8

Expert Comment

by:dmeeren
ID: 34157932
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
 

Author Closing Comment

by:nac_
ID: 34158732
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
 
LVL 8

Expert Comment

by:dmeeren
ID: 34159352
Okay, nice to know that one!
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question