<

Quick Commandline Tricks to reboot Windows

Published on
12,997 Points
6,897 Views
1 Endorsement
Last Modified:
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.
1
Comment
Author:deepaknet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
0 Comments

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Join & Write a Comment

This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month