[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Quick Commandline Tricks to reboot Windows

Published on
13,225 Points
1 Endorsement
Last Modified:

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.

Trust this helps a beginner-user with quick and easy tips in shutting down/rebooting his system through simple commandline.

Featured Post

Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

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