Hibernate Shortcut - Create

Page 3 of 3 FirstFirst 123

  1. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #20

    You could do the same for them as well. You'll just need to substitute the bottom command for the .bat file below for the one you want instead.

    The message displayed by the echo command can be anything you like to help know what it it's for, etc...

    Code:
    @echo off
    echo Your message here
    timeout /t 30 /nobreak
    shutdown -h -f
    I'm not sure how to have the abort command work using this method though, but luckily it gives you the option to abort during the prompt.
    Last edited by Brink; 24 Nov 2014 at 20:21. Reason: update
      My Computer


  2. Posts : 1,364
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #21

    Brink said:
    The message displayed by the echo command can be anything you like to help know what it it's for, etc...
    I get a double message display per attached. How to have single? I also don't need to see the path/timeout ...
    Attached Thumbnails Attached Thumbnails Hibernate Shortcut - Create-hib.png  
      My Computer


  3. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #22

    It needs a @echo off as the first statement.

    Code:
    @echo off
    echo HIBERNATE
    timeout /t 30 /nobreak
    shutdown -h -f
      My Computer


  4. Posts : 1,364
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #23

    DavidE said:
    It needs a @echo off as the first statement.
    Yep! - that's what it needed, thank you DavidE.

    Shawn, thank you for all your help. I think I will keep my 'abort' button around for a while. However, that countdown cmd prompt is really drawing me in.

    oh, and thx to Lordbob75 for this great tutorial,

    -take care all!
      My Computer


  5. Posts : 1,364
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #24

    Brink said:
    You could do the same for them as well. You'll just need to substitute the bottom command for the .bat file below for the one you want instead.

    The message displayed by the echo command can be anything you like to help know what it it's for, etc...

    Code:
    @echo off
    echo Your message here
    timeout /t 30 /nobreak
    shutdown -h -f
    ...
    I'M BACK - heh, heh,

    I decided to go the .bat file/shortcut route for Restart and Shutdown and I have followed your examples to the letter. HOWEVER - after the command window 30 second countdown is complete it closes and a new window/pop-up appears (attached ) and a new 30 second countdown begins. How do I stop the 2nd pop-up? -thx

    my bat files :

    @echo off
    echo RESTART
    timeout /t 30 /nobreak
    shutdown -r -f

    @echo off
    echo SHUTDOWN
    timeout /t 30 /nobreak
    shutdown -s -f
    Attached Thumbnails Attached Thumbnails Hibernate Shortcut - Create-sd1-1.png  
      My Computer


  6. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #25

    You can do that by changing the last command to do the action immediately after the timeout. :)

    Code:
    @echo off
    echo RESTART
    timeout /t 30 /nobreak
    shutdown -r -f -t 00

    Code:
    @echo off
    echo SHUTDOWN
    timeout /t 30 /nobreak
    shutdown -s -f -t 00
      My Computer


  7. Posts : 1,364
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #26

    ^
    YES! - thx for the fix Shawn, adios ...
      My Computer


  8. Posts : 71,977
    64-bit Windows 11 Pro for Workstations
       #27

    You're most welcome. :)
      My Computer


 
Page 3 of 3 FirstFirst 123

  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 00:33.
Find Us