Quick Commandline Tricks to reboot Windows

AID: 1154
  • Status: Published

4910 points

  • Bydeepaknet
  • TypeTips/Tricks
  • Posted on2009-07-09 at 05:53:53
Introduction

Often we come across situations wherein our batch files would be needing to reboot Windows for a variety of reasons. A few of them would be like:

(1) Setup files have been updated whose changes can take effect only after a reboot of the system has happened.
(2) A file got locked or a Windows service is not responding. If such a step is detected in the installation procedure, the only remedial step that might be left is to have the system restarted and then to resume the installation.

Quick ways to reboot Windows
This tip ushers to present you with simple ways to achieve Windows restart through quick commandline options without depending on or asking to the user to manually reboot the box.

  • iisreset /timeout:1 /rebootonerror: This would attempt to restart IIS Services within a timeframe mentioned in the timeout attribute. If this fails, the system itself is given a reboot.


  • shutdown -r: Windows XP ships with a neat little utility to restart/shutdown/logoff a user. A quick shutdown -r would help to restart a Windows XP box. Appending a -m \\computername would have the restart command sent to the computer named as computername, subject to the logged on user having restart privileges on the target machine.


Taking help of RunDll32
The rundll32.exe also lends a great helping hand in rebooting, shutting down and logging off the user. However, the arguments to be passed for each version of Wndows (like NT, XP etc) might be too much varying and overwhelming for a quick and more generic tip. However, I would like a share a URL which presents a comprehensive table on the capabilities of rundll32. Check it out here.

Conclusion
Trust this helps a beginner-user with quick and easy tips in shutting down/rebooting his system through simple commandline.
Asked On
2009-07-09 at 05:53:53ID1154
Tags

windows

,

reboot

,

commandline

Topic

Operating Systems Miscellaneous

Views
4305

Comments

Add your Comment

Please Sign up or Log in to comment on this article.

Join Experts Exchange Today

Gain Access to all our Tech Resources

Get personalized answers

Ask unlimited questions

Access Proven Solutions

Search 3.2 million solutions

Read In-Depth How-To Guides

1000+ articles, demos, & tips

Watch Step by Step Tutorials

Learn direct from top tech pros

And Much More!

Your complete tech resource

See Plans and Pricing

30-day free trial. Register in 60 seconds.

Loading Advertisement...

Top Misc OS Experts

  1. arnold

    20,260

    0 points yesterday

    Profile
    Rank: Genius
  2. hanccocka

    13,100

    0 points yesterday

    Profile
    Rank: Genius
  3. woolmilkporc

    11,500

    0 points yesterday

    Profile
    Rank: Genius
  4. nobus

    6,728

    0 points yesterday

    Profile
    Rank: Savant
  5. lionelmm

    5,060

    0 points yesterday

    Profile
    Rank: Master
  6. CarlWebster

    5,000

    1,000 points yesterday

    Profile
    Rank: Genius
  7. eoinosullivan

    4,800

    0 points yesterday

    Profile
    Rank: Genius
  8. rindi

    4,300

    0 points yesterday

    Profile
    Rank: Savant
  9. MASQUERAID

    4,164

    0 points yesterday

    Profile
    Rank: Genius
  10. serialband

    4,000

    0 points yesterday

    Profile
    Rank: Master
  11. ganjos

    4,000

    0 points yesterday

    Profile
    Rank: Guru
  12. garycase

    4,000

    0 points yesterday

    Profile
    Rank: Genius
  13. thinkpads_user

    4,000

    0 points yesterday

    Profile
    Rank: Genius
  14. Syed_M_Usman

    4,000

    0 points yesterday

    Profile
    Rank: Wizard
  15. strung

    3,800

    0 points yesterday

    Profile
    Rank: Genius
  16. paulsolov

    3,700

    0 points yesterday

    Profile
    Rank: Genius
  17. Russell_Venable

    3,500

    0 points yesterday

    Profile
    Rank: Wizard
  18. leew

    3,332

    0 points yesterday

    Profile
    Rank: Savant
  19. flubbster

    3,000

    0 points yesterday

    Profile
    Rank: Genius
  20. oBdA

    3,000

    0 points yesterday

    Profile
    Rank: Savant
  21. breadtan

    3,000

    0 points yesterday

    Profile
    Rank: Genius
  22. giltjr

    2,984

    0 points yesterday

    Profile
    Rank: Genius
  23. meyersd

    2,800

    0 points yesterday

    Profile
    Rank: Genius
  24. hjgode

    2,800

    0 points yesterday

    Profile
    Rank: Guru
  25. MlandaT

    2,800

    0 points yesterday

    Profile
    Rank: Genius

Hall Of Fame