What to Do When Windows’ “Corrupt Files” Message Haunts You

By  |  Thursday, November 4, 2010 at 11:18 am

I did the unbelievable — a beginner’s mistake, if I ever heard one. I unplugged  of a USB-attached device without using the Safely Remove Hardware applet. And up from the depths of the system tray came the here-comes-lunch “Windows – Corrupt File” message.

I was worried, and rightly so, because it was a client’s hard drive that now had a corrupt file. (He doesn’t read TechBite, so the secret’s safe.)

Disconnect Me

The Safely Remove Hardware applet lets Windows know you’re removing a flash drive, your camera’s memory card, or an external hard drive from your PC USB port. That way Windows flushes the device’s disk buffers.

Using Safely Remove Hardware also makes sure you’re not doing something idiotic, like copying a file to the device while removing the device. (Sure, I’ve done it.)

To confuse things, some devices, like a teenager’s whatever, couldn’t give a rat’s patootie if you don’t use Safely Remove Hardware. For instance, an ancient MP3 player Judy uses seems to have a special relationship with Windows. I figure if the device doesn’t care, neither should I, and I don’t bother with Safely Remove Hardware.

Occasionally, a device will kvetch when you use Safely Remove Hardware and obliquely say that it can’t be stopped right now. It’s because something — a program or service — is putting a hold on the device. It happens to me when I haven’t closed Windows Explorer after copying files to the device. Worst case, the device will be released when you shut down Windows.

And I know some of you are persistent and will find the two settings Windows uses for devices attached through a USB connection. One’s for quick removal and the other’s for better performance.

Windows makes the decision for you. I suggest you shouldn’t fiddle with the settings. I often question authority, but this is not the time for it.

Make It Easier to Use

I thought about why I didn’t use the Safely Remove Hardware tool. I think it’s because I’ve let the system tray (actually, the notification area) get cluttered. It’ll take a few minutes to create, but you might be better off with a Safely Remove Hardware icon on the desktop.

Here’s how: From the desktop, right-click, choose New, Shortcut, type RunDll32.exe shell32.dll,Control_RunDLL hotplug.dllin the “Type the location of the item:” field, and click Next. Type Remove Hardware and click Finish. Finally, right-click your new Remove Hardware shortcut, select Properties from the drop-down menu, choose Change icon, and stick %SystemRoot%system32hotplug.dll in the “Look for icons in this file:” field, and click OK and OK.

So there really is a good reason to use Safely Remove Hardware. (And yes, I massaged my client’s hard drive with chkdsk a couple of times and finally restored the corrupt file).

[This post is excerpted from Steve’s TechBite newsletter. If you liked it, head here to sign up–it’s delivered on Wednesdays to your inbox, and it’s free.]

 
2 Comments


Read more: ,

2 Comments For This Post

  1. Pat Says:

    Or use Usb Disk Ejector http://quick.mixnmojo.com/usb-disk-ejector

  2. Microsoft CRM Says:

    Windows does not get started when you have put USB so method is I unplugged of a USB-attached device without using the Safely Remove Hardware applet. And up from the depths of the system tray came the here-comes-lunch “Windows – Corrupt File” message.

    I was worried, and rightly so, because it was a client’s hard drive that now had a corrupt file. (He doesn’t read TechBite, so the secret’s safe.)