Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Shutdown command problem

08 Jul 2009   #1
vasujain

Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
 
 
Shutdown command problem

hi all
i am making a shortcut for shutdown .
so i m using command
shutdown -h for hibernate
shutdown -l for logoff

but whenever i use time for it
like
shutdown -h -t 120
where t 120 is number of secs after which the command will execute then the command doesnt executes

this command works fine for restart shutdown -s -t 120

help me s o that i can use hibernate with time


My System SpecsSystem Spec
.

08 Jul 2009   #2
ccatlett1984

 

Try the following
Code:
shutdown /h /t:120
My System SpecsSystem Spec
08 Jul 2009   #3
vasujain

Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
 
 

no it aint working either...
My System SpecsSystem Spec
.


08 Jul 2009   #4
mikinho
Microsoft MVP

6x W2K8 R2 (x64), 6x W7 7600 (x64), 2x Gentoo (x64), 1x Ubuntu 9.04 (x64), 1x pfSense (FreeBSD)
 
 

The time-out switch is not supported by hibernate.

You could use AT 12:20 "shutdown /h" to schedule a hibernate at a specific time.
My System SpecsSystem Spec
08 Jul 2009   #5
ccatlett1984

 

In that case, grab this SysInternals PS Shutdown Tool

Give that a whirl.
My System SpecsSystem Spec
08 Jul 2009   #6
vasujain

Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
 
 

Quote   Quote: Originally Posted by mikinho View Post
The time-out switch is not supported by hibernate.

You could use AT 12:20 "shutdown /h" to schedule a hibernate at a specific time.
but i am using a peice of software that hibernates the system exactly after the time i give...

vista shutdown timer....

so time switc is tere wth logoff and hibernate...the syntax must be differnet i guess
My System SpecsSystem Spec
08 Jul 2009   #7
vasujain

Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
 
 

Quote   Quote: Originally Posted by ccatlett1984 View Post
In that case, grab this SysInternals PS Shutdown Tool

Give that a whirl.
tx 4 the link i already figured out taht thing while i was searching 4 the solutin.....but thing is i wana du it on own....
My System SpecsSystem Spec
08 Jul 2009   #8
mikinho
Microsoft MVP

6x W2K8 R2 (x64), 6x W7 7600 (x64), 2x Gentoo (x64), 1x Ubuntu 9.04 (x64), 1x pfSense (FreeBSD)
 
 

Quote   Quote: Originally Posted by vasujain View Post
but i am using a peice of software that hibernates the system exactly after the time i give...

vista shutdown timer....

so time switc is tere wth logoff and hibernate...the syntax must be differnet i guess
Maybe I'm not following what you are saying. In Vista the the timeout swtich doesn't work either. This is because of the underlying APIs. Other applications, like psshutdown, work by creating either a temporary windows service or keeps an active process opens that waits until the time-out to hibernate. The shutdown.exe process does neither. The shutdown.exe process when shuttting down or restarting uses the InitiateSystemShutdownEx API that supports an optional timeout. The APIs for sleep and hibernation do not support a time-out.
My System SpecsSystem Spec
08 Jul 2009   #9
vasujain

Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
 
 

Quote   Quote: Originally Posted by mikinho View Post
Maybe I'm not following what you are saying. In Vista the the timeout swtich doesn't work either. This is because of the underlying APIs. Other applications, like psshutdown, work by creating either a temporary windows service or keeps an active process opens that waits until the time-out to hibernate. The shutdown.exe process does neither. The shutdown.exe process when shuttting down or restarting uses the InitiateSystemShutdownEx API that supports an optional timeout. The APIs for sleep and hibernation do not support a time-out.
tx a lot...that wud du the required work...adding reputation 2 u...
My System SpecsSystem Spec
29 Dec 2010   #10
flez

win7
 
 

Having same issue but i'm not understanding the solution..

think i'm missing the point.


if I want to force a shutdown I can just creat a 'dothis.cmd' edited with notepad that contains one line of ''shutdown /s /t 3600'' and in 60 minutes it will shutdown.

so why does it support hibernate if the option never works?

changing the line in the batch file to shutdown /h /t 3600 fails everytime

I'd love to get this working as my mb does not support shutdown in win7(dont ask, even the machines front power button does not turn it off, well it does, then 3 seconds later it turns back on, every time)
My System SpecsSystem Spec
Reply

 Shutdown command problem




Thread Tools





Similar help and support threads
Thread Forum
Shortcut command to shutdown without cmd popup
Hello, I tried many commands with switches to shut down the system, but everything is popping a prompt and closes itself withing seconds. This is very annoying. Are there any way to shut down silently like default power button do?
General Discussion
bsod a few seconds after giving shutdown command
so i get this bsod after giving the shut down command. So here is the zip as given by the rules.
BSOD Help and Support
How to shutdown and apply updates via DOS command
I am having a hard time finding an answer to this on the forums and the net in general. If I goto Start/Shutdown, and there is the exclamation mark on it, it will apply any updates and shutdown the computer. Simple Enough right? Well, I want to know what are the DOS commands to do such a thing...
Windows Updates & Activation
Shutdown Command and Remote Desktop
Im having a problem that i just can not figure out. I have two pc's running windows 7 64 bit. One labtop one desk. I have been recently trying to remote desktop but it will not work on neither computer. All the correct options are checked to allow. Firewall has exception for it on both ect. I just...
Network & Sharing
Shutdown command in DOS for delayed hibernation
I'd like to be able to set a timer for delayed hibernation of my computer (so it can play music while I fall asleep). The command should be: shutodown \h \t 999 Why doesn't it work? It works for: shutodown \s \t 999 but I want it to hibernate, not shutdown. Can anyone help?
Software
Pinning from other drive? Command on shutdown?
This is a two part question. Firstly it appears that windows 7 does not let you pin programs to the taskbar unless they are in c: drive. does anyone know of a workaround or registry hack for this? I can make a shortcut on c: and then pin the shortcut but then when I launch I have two icons. I...
Software

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 11:55.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App