Shutdown command problem

Page 1 of 2 12 LastLast

  1. Posts : 69
    Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
       #1

    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 Computer


  2. Posts : 795
    windows 7 RTM x64
       #2

    Try the following
    Code:
    shutdown /h /t:120
      My Computer


  3. Posts : 69
    Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
    Thread Starter
       #3

    no it aint working either...
      My Computer


  4. Posts : 397
    6x W2K8 R2 (x64), 6x W7 7600 (x64), 2x Gentoo (x64), 1x Ubuntu 9.04 (x64), 1x pfSense (FreeBSD)
       #4

    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 Computer


  5. Posts : 795
    windows 7 RTM x64
       #5

    In that case, grab this SysInternals PS Shutdown Tool

    Give that a whirl.
      My Computer


  6. Posts : 69
    Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
    Thread Starter
       #6

    mikinho said:
    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 Computer


  7. Posts : 69
    Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
    Thread Starter
       #7

    ccatlett1984 said:
    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 Computer


  8. Posts : 397
    6x W2K8 R2 (x64), 6x W7 7600 (x64), 2x Gentoo (x64), 1x Ubuntu 9.04 (x64), 1x pfSense (FreeBSD)
       #8

    vasujain said:
    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 Computer


  9. Posts : 69
    Windows 7 RC ,Windows Vista Ultimate ,Windows XP SP3,Ubuntu 8.01
    Thread Starter
       #9

    mikinho said:
    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 Computer


  10. Posts : 63
    win7
       #10

    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 04:05.
Find Us