TechBuzzPro

How to Fix Problem Ejecting USB Mass Storage Device

· 5 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The fastest fix for a "problem ejecting USB mass storage device" error is to close every program that might be using the drive, wait a few seconds, and try the Safely Remove Hardware icon again. If that fails, sign out of Windows and back in, or shut down the PC completely before unplugging the drive. The error almost always means Windows still has an open handle to a file on the USB drive, not that the drive is damaged.

What You'll Need

  • A Windows PC with the USB drive still connected.
  • Access to Task Manager (Ctrl+Shift+Esc) and, if needed, an administrator account.
  • No extra software is required; everything below uses built-in Windows tools.

Step-by-Step

  1. Close visible programs that may be using the drive. Shut down File Explorer windows showing the USB drive, any Office document saved on it, media players, photo viewers, backup tools, and sync clients such as OneDrive or Google Drive. Then click the Safely Remove Hardware icon in the notification area and choose Eject. Wait for the "Safe to Remove Hardware" message before pulling the drive.
  2. Check for hidden handles with Task Manager. Press Ctrl+Shift+Esc, open the Processes tab, and look for apps with the drive letter in their name or description. If you are unsure which process is holding the drive, restart Windows Explorer: on the Processes tab, right-click Windows Explorer and choose Restart. This closes all File Explorer windows without signing you out, then try ejecting again.
  3. Use the Safely Remove Hardware applet directly. Press Windows+R, type RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll, and press Enter. In the window that opens, select the USB device and click Stop. This is the same tool as the tray icon but sometimes responds when the icon does not.
  4. Sign out and sign back in. Signing out closes every user-level program and releases file handles that Task Manager cannot show. After signing back in, try the eject icon again. If the drive still refuses, continue to the next step.
  5. Shut down the PC completely. Choose Start > Power > Shut down (not Restart, and not Sleep). Once the machine is off, unplug the USB drive. A full shutdown powers down the USB controller, so no process can keep the drive busy. This is the safest fallback when you need to remove the drive now.
  6. Disable write caching only if the problem repeats. Open Device Manager, expand Disk drives, right-click the USB drive, choose Properties, open the Policies tab, and select "Quick removal." This tells Windows not to cache writes, so you can unplug the drive without ejecting first. The trade-off is slightly slower copy speeds. Labels can differ slightly by Windows version, so look for the policy option that mentions quick removal.

Common Mistakes

  • Pulling the drive while a copy is still running. Even a progress bar that looks stuck is still writing. Wait for it to finish or cancel it before ejecting.
  • Trusting the tray icon only. The icon can fail silently while a background service still holds the drive. Check Task Manager before giving up.
  • Choosing Restart instead of Shut down. A restart can keep the USB controller powered and the handle open. Only a full shutdown guarantees release.
  • Disabling write caching on every drive. Set "Quick removal" only for the USB drive that keeps failing, not for internal disks, where caching improves performance.
  • Ignoring the drive letter. If you are unsure which process is using the drive, note its letter (for example E:) and search Task Manager for that letter before closing anything.

Tips

  • Eject the drive before you shut down the PC, not after. Once Windows is off, the eject icon is gone and you cannot use it.
  • Keep File Explorer windows closed when you are done with a USB drive. An open window is the most common cause of the error.
  • If you use cloud sync apps, pause syncing before ejecting. They often hold files open in the background.
  • Use the same USB port each time. Switching ports can leave a stale handle on the old port until you reboot.
  • Format the drive with the exFAT or FAT32 file system if you move it between Windows and other devices; NTFS can create extra locks on some systems.

Troubleshooting

If the eject icon still reports the drive is in use, open Resource Monitor from the Start menu search, go to the Disk tab, and look under "Disk Activity" for the USB drive letter. The "File" column shows which file is being accessed and the "Image" column shows the process. Close that process, then eject again. If the process is a Windows service you do not recognise, do not kill it; sign out instead.

If the drive does not appear in the Safely Remove Hardware list at all, unplug it only after a full shutdown, then reconnect it and check Device Manager for a warning icon. A yellow triangle means a driver problem; right-click the device and choose Uninstall device, then unplug and replug the drive so Windows reinstalls the driver. Do not uninstall the driver for an internal disk.

If Windows says the device cannot be stopped because a program is using it but you cannot find the program, run a full shutdown as described in Step 5. That clears every handle. If the error returns every time you use the drive, set the drive's policy to "Quick removal" so you can unplug safely without ejecting.

Frequently Asked Questions

Is it safe to unplug a USB drive without ejecting?

Only if no copy is in progress and the drive is set to "Quick removal." Otherwise you risk a partially written file or a corrupted file system. Ejecting is always the safer choice.

Why does Windows say the device is in use when nothing is open?

A background process, sync client, or antivirus scan can hold a file handle without showing a window. Task Manager and Resource Monitor reveal these hidden handles.

Does shutting down the PC eject the drive?

No, but a full shutdown releases all file handles and powers down the USB controller, so unplugging after shutdown is safe. A restart may not release the drive.

Will disabling write caching damage my drive?

No. "Quick removal" only changes how Windows buffers writes. It is slightly slower but safer for drives you unplug often.

Can I eject a USB drive from the command line?

Windows does not include a built-in command to eject a specific USB drive. Use the Safely Remove Hardware applet or the tray icon instead.

What if the drive is not recognized after I plug it back in?

Try a different USB port, then check Device Manager for a warning icon. If the drive appears with an error, uninstall the device there and replug it so Windows reinstalls the driver.