Exodus WhyReboot™ is a small (~100KB) "Portable" Windows application that helps you decide whether to reboot your computer after running an installer. It does this by displaying a list of "pending file operations" (rename, delete, etc) that will occur after rebooting your computer. Quite often, no reboot is really needed.
You can download the utility by clicking the file attachment link at the end of this article.
December 18, 2006 news flash: Version 220.127.116.117 now available. See our news release for more information.
Ministry of Silly Prompts
"Would you like to restart your computer now?" Arguably the most aggravating prompt displayed by your Windows-based computer.
When I woke up this morning, I said to myself, "I think I'd like to reboot my computer several dozen times today!"
Why should you have to reboot your Windows-based computer so many times when installing software? Why do Microsoft Windows product installers insist on a reboot?
I've always wondered why software installation should require a reboot. In some cases, I've suspected that the reboot is not really necessary, but is done as a precautionary measure (or due to sheer laziness) by the author of the install script. (My experience as a software developer tends to confirms this.) Further research hasn't given me any reason to change my mind.
In particular, I was tinkering with Corel Draw 8 update patch installers, available from the Corel FTP site. After installing these patches, I couldn't help but investigate the reported need to reboot the computer after every patch install (one of these patches replaced only a help file...) Anyway, my investigation indicates that some installers really don't need you to reboot the computer, or that you can wait until the next 'normal' reboot of your computer without any ill effect. This is especially true of Windows XP Home or Pro - they seem to deal pretty well with most installations without a reboot, regardless of what the installer tells you.
As far as I can determine, the most common reason to require a reboot after an installation is to replace or delete a file that is currently 'open' (or otherwise in use) by the operating system or running software, such as a core component of the system, or the executable file used by an application left running during the install (which is why many installers advise you to close all Windows programs before proceeding with the installation -- some are nice enough to list running applications that may cause problems, and ask you to close them before continuing.)
If files that are currently 'in use' must be replaced or removed, a method must be found to do so after the files are no longer in use.
Less common, but something that still plagues us today, is when registering or changing the state of a device driver - which should not require a reboot.
Another reason to reboot the computer is to allow the installer to clean up after itself -- in the case of the Corel patches mentioned earlier, several reboots were needed only because the self-extracting installer needed to clean up temporary files that were used only during the installation. In this case, the program that was running (the installer) needs to be deleted from a temporary location on the hard disk after the installer has completed. But how can we accomplish this? The program is no longer running, so the file can be deleted safely, but this also means that the program can no longer perform any operations. The reboot was necessary from a 'housekeeping' standpoint, but not critical to continue using the system–the installer could have advised that a reboot is required but not immediately.
The simple, supported solution is to record an entry that will allow the file(s) to be copied, renamed, or deleted after the system reboots but before Windows loads (or any user applications start.) It is this method that most installer systems use.
I've investigated the methods used to request 'deferred' file operations after a reboot. It's not that tough, Microsoft provides sufficient documentation on their website:
There are other resources on the web (see related links, below)
I present to you the results of my curiosity and investigations: The WhyReboot™ utility.
Here's what it does:
- Examines documented registry locations for post-reboot file copy/rename/delete operations.
- Examines documented registy locations for "Run Once" applications: these will run once on the next reboot, and are probably used by an installer to perform post-reboot file cleanup and other operations such as registry manipulation.
- Examines Wininit.ini on Win9x/ME platforms for pending file rename/delete operations.
- WhyReboot cannot report file operations that may be carried out by programs configured to run automatically every time you start the computer (HKLM\Software\Microsoft\CurrentVersion\Run), or a user logs in (HKCU\Software\Microsoft\CurrentVersion\Run)
- Currently, it does not report changes in driver, program, or service state that require a reboot in order to take effect: for instance, if an installer copies new drivers, programs, or services onto your system and configures the system so that these will be started automatically at boot or login, your system will have to be restarted. These changes are not detected by WhyReboot.
- While it may be possible to detect these kinds of system changes, this is beyond WhyReboot's scope at this time.
How to reboot?
There are many ways to reboot the computer - depending on the Windows version you are using, you can use the task manager, or from a command line prompt, you can use the shutdown command. Sysinternals also supplies a command line utility called PSShutdown, which allows you to initiate a shutdown. And if all else fails, you can always pull the power cord out of the wall socket.