Blog Post

Storage at Microsoft
1 MIN READ

Storage Tips: Check which application is preventing safe USB removal

FileCAB-Team's avatar
FileCAB-Team
Iron Contributor
Apr 10, 2019
First published on TECHNET on Oct 14, 2008
If the issue is a veto on a query for removal, you can look for which application has the reference on SetupApi logs. Oh.exe, or Process Explorer may also help to identify the process that’s causing the lock.

SetupApi Logs
SetupApi is a system component that device installation software can use to perform custom operations. By enabling SetupApi logs, you can check which process has a reference to the device.

Links
http://msdn.microsoft.com/en-us/library/ms791358.aspx
http://msdn.microsoft.com/en-us/library/aa477110.aspx



Open Handlers
Oh.exe ( O pen H andlers) is a command line tool that can be downloaded for free with Windows Server Resource Kit Tools. This command-line tool shows the handles of all open windows and  information relating to a particular process, object type, or object name.

Links
http://www.microsoft.com/downloads/info.aspx?na=22&p=1&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=&u=%2fdownloads%2fdetails.aspx%3fFamilyID%3d9d467a69-57ff-4ae7-96ee-b18c4790cffd%26DisplayLang%3den
http://support.microsoft.com/kb/q172710/



Process Explorer
Process Explorer is an application that shows you information on which handlers or DLLs each process has opened.

Links
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx




More Information
http://windowsxp.mvps.org/processlock.htm , by Ramesh Srinivasan, MVP
http://blogs.technet.com/markrussinovich/archive/2006/03/27/the-case-of-the-mysterious-driver.aspx , by Mark Russinovich, MSFT
http://msdn.microsoft.com/en-us/library/ms791358.aspx , MSDN documentation



[Updated, October 14th, 1:00 PM]
Read the thread in Microsoft Communities on USB safe removal:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.storage&tid=a5f7cbcd-8f13-4cdd-a693-2fb10efaa6a2&cat=en_US_74589424-a0f2-411f-b5d6-43209e17b7e1&lang=en&cr=US&sloc=&p=1

Updated Apr 10, 2019
Version 2.0
No CommentsBe the first to comment