WhyReboot

Why Reboot?

WhyReboot is a small (~100KB) 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 1.0.1.537 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.

You know, 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 installers create such a mess?

Well, I've always wondered why any particular 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 or outright incompetence) by the author of the install script. (My experience as a software developer confirms the prevalence of this sort of thing.) 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.

Why Reboot?

As far as I can determine, the most common reason to require a reboot after an installation is to update 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 binary executable file that is used by an application that was running during the install (which is why most installers always advise you to close all Windows programs before installing -- some are nice enough to list running applications that may cause problems, and ask you to close them before continuing.) So, if files that are currently in use must be replaced, 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, really.

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 simple (but often inelegant) solution is to record an entry in a special location defined by Windows that will allow the file(s) to be copied, renamed, or deleted after the system reboots but before most of Windows is loaded (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.

Examples:

Limitations

  • 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.

100% Clean!

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.


AttachmentSize
WhyReboot-1.0.1.537.zip52.72 KB
Posted by: Mike on Wed, 09/12/2007 at 4:43am

2 things

On Vista when you start it, it says "Detected Windows NT, 2000, XP, or variant" - just a minor thing though, seems to work fine. A small suggestion I have is that the detected reasons be grouped into categories (deletes, registry changes etc.)

Excellent tool btw, right into my little toolkit :P

karl_w_w (not verified) – Sun, 11/18/2007 – 9:23am

Very good. Bravo. It goes

Very good. Bravo. It goes straight into my 120.0052 GB Toolkit!

Hackm0d (not verified) – Fri, 12/14/2007 – 10:39pm

Bug report

After uninstalling Workrave (the RSI prevention program - I have not tried other programs, I only mention this just so you can hopefully recreate the problem) the new version finds nothing:

Whyreboot © 2003-2006 Exodus Development, Inc. http://exodusdev.com

Version 1.0.1.537

NOTE: These results may not reflect all pending operations, and you should use your own good sense in deciding whether to reboot your computer after an install.

Detected Windows NT, 2000, XP, or variant

Results:

No items were found.

NOTE that this does not mean that you don't need to reboot your computer, rather, WhyReboot was unable to detect any pending file operations.

But my old version finds this:

WhyReboot Version 1.0.0.500
Exodus Development, Inc. http://www.exodus-dev.com

NOTE: These results may not reflect all pending operations,
and you should use your own good sense in deciding whether
to reboot your computer after an install.

Windows NT, 2000, XP, or variant

Results:

REGISTRY: PendingFileRenameOperations
> DELETE C:\Users\Blah\AppData\Local\Temp\_iu14D2N.tmp
> DELETE C:\Program Files\Workrave\lib\harpoon.dll
REGISTRY: PendingFileRenameOperations END.

2 items were found and reported.

I think a bug must have crept in. Many thanks for this very useful program.

Tester (not verified) – Sat, 12/15/2007 – 5:36am

It would be nice to have a

It would be nice to have a button in the interface to open regedit to the applicable registry key.

Guest (not verified) – Wed, 12/26/2007 – 5:50am

Reboot request

Hi, I've just been using my other PC (Windows XP) which although on - line, I only use for keeping music files. Having left the PC ripping music from one of my CD's, I came back in the room to find a blank screen with the message -
Reboot computer (or something like that) insert diskette into drive and press any key when ready. As a complete novice this is beyond me and whatever I do I can't get rid of the message unless I turn off the PC manually. It just comes back up despite hitting F2 or Esc. F2 just looks confusing. Any help would be much appreciated! Thankyou. P.s sorry I didn't know what you meant by 'Homepage'?

Kevin (not verified) – Fri, 03/07/2008 – 2:45pm

I second the motion for a

I second the motion for a 'Jump to' for advanced users that can make the changes told by Whyreboot, then jump to the key in the registry to clear it........and like always if we trash it-we're on our own!

In any event, thanks for the very useful software.

Dave (not verified) – Fri, 04/11/2008 – 12:38pm

to make a nice program better

In vista (SP1?) there are also 2 folders with extra Whyreboot info:
C:\Windows\winsxs\Temp\PendingDeletes\
C:\Windows\winsxs\Temp\PendingRenames\

I think there is info about WindowsUpdate.

DH (not verified) – Tue, 06/03/2008 – 11:54pm

Thanks for the tip mate, was

Thanks for the tip mate, was looking for this!

ffxi gil (not verified) – Fri, 08/08/2008 – 8:21am

Thanks for the Overview

Though it's probably not a program you're going to be running all the time, WhyReboot could come in very handy during those times that you're setting up a new computer and every second software wants you to restart Windows.

swg credits (not verified) – Fri, 10/31/2008 – 5:16am

When should you reboot then?

Hi,
I'm about to reinstall my main machine since the death of a motherboard. So, I'm intending to install a whole whack of programs and obviously I'd love to be able to do this without rebooting as much as possible. So, I'll be using your utility. Thanx for making it available.

Anyhow, I have a couple of elementary questions concerning when a reboot is necessary. I looked at your two examples and the first one, in particular, showed that files in system32 were going to be renamed and a .dll file was going to be registered. So, it seems obvious that we should reboot given that IE is a program that Windows is inseparable from. So, fair enough.

What I'm wondering, however, is whether we could come up with some basic rules of thumb on when a reboot is needed, or alternatively when it is not. So, obviously if files are merely being deleted from a temp location then rebooting is not necessary. If files in a core system folder are being renamed on reboot because they are currently in use, then we can say that a reboot is needed, unless we're not intending to run the program in question until the next reboot. I was wondering if you had any other conditions to add. Can I suggest a few basic bullets with the basic rules of thumb on when a reboot is necessary and when not, with a couple more examples? This would no doubt help the newbie, of which I am one. Anyhow, I very much appreciate this program. Thanx again for your generosity.

Guest (not verified) – Sat, 11/01/2008 – 5:42am

Reboot when you think you ought to based on what you know

I tend to reboot when installing software or updating the system, *if* there are pending file changes. I try not to "stack" installations on top of another without rebooting, unless I know the install didn't replace any critical files.

So, the answer is: it depends!

For example, if you install a Windows Service Pack, or installed Microsoft Office, I'd definitely reboot before doing much else -- those kinds of installers muck with all kinds of things. If you are installing a patch to some application (or you are installing a simple, lightweight application), and there are no system files changed (as evidenced by WhyReboot) then, dare I say, "why reboot?"

The purpose of rebooting after an install is to allow the system to update files that are in use at the time, or, to start up newly-installed system components such as drivers or services.

So, I look at the scope of what I've just installed, then decide whether I can continue using the system. Running install after install without rebooting may be a recipe for disaster. In that case, I'd play it safe unless I knew that the last install was totally localized to the application you just installed.

Questions to ask:

- Did the installer add or change system components? A CD/DVD burner application may have. A device driver for a new device probably did. The system may work find with new devices ("Plug and play") but it all depends on the nature of the device. Best to take the installer seriously if it tells you you should reboot.

- Can I afford to lose any work if the system becomes unstable due to my refusal to reboot? (I have to say, in all my years of using Windows XP, this has *never* happened.) If the answer is no, I generally reboot.

Mike – Sat, 11/01/2008 – 7:41am

Does restart is required for taking registry setting effect

Question
Does restart is required for taking registry setting effect?
Answer
Reason 1
The most common reason to require a reboot after an installation is to update 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 binary executable file that is used by an application that was running during the install (which is why most installers always advise you to close all Windows programs before installing
Reason 2
Another reason to reboot the computer is to allow the installer to clean up itself. Application is unable to delete some files in temporary directory created during installation. When I restart it will delete all those entries from the registry

kunal (not verified) – Fri, 12/12/2008 – 5:56am

scheduled task service

Hi Mike,I was wondering if you could tell me why my task service is not running and what could i do? Every time I turn my compurter on a message will come up telling me that some task did not execute at their scheduled times because the task scheduler service was not running.You can view the list of missed task and attemp to run them again from the scheduled task folder.Well I try that too and that don't work so I have to run my task manually.Can you help me?

shauna (not verified) – Sun, 12/21/2008 – 6:45am

scheduled task service

same question.Can you help me or tell me why it's not running?

shauna (not verified) – Sun, 12/21/2008 – 6:51am

Post new comment

This helps us decide if you are a human, and not just some visiting bot.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <h3> <h4> <br> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.
More information about formatting options