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 for2: Shutdown command problem
Thread Forum
bsod a few seconds after giving shutdown command BSOD Help and Support
Suddenly, sleep command leads to window's shutdown? General Discussion
How to shutdown and apply updates via DOS command Windows Updates & Activation
Shutdown Command and Remote Desktop Network & Sharing
Shutdown command in DOS for delayed hibernation Software
Pinning from other drive? Command on shutdown? 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 01:10 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App