Solved

How to shutdown laptop when locked and lid is closed

Posted on 2010-11-16
9
660 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
Comment Utility
Why not use the shutdown command that is present in the dos prompt?
0
 
LVL 8

Expert Comment

by:PenguinN
Comment Utility
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
Comment Utility
Assuming you have admin rights

shutdown -s  -m \\computername -t 0 -f
0
 
LVL 35

Expert Comment

by:Joseph Daly
Comment Utility
Or even easier use

shutdown /i

and select the computer you want to shut down from the GUI.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:nac_
Comment Utility
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
Comment Utility
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
Comment Utility
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_
Comment Utility
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
Comment Utility
Okay, nice to know that one!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

When you use the right mouse button (assuming you're right handed) to click something in Windows, you usually get what is called a "context menu".  It's called that because the items in the menu vary according to context, that is, according to where…
First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
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 basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now