Error Message Deleting File That Is in Use Using Setupapi.dll and INF Script

ID: Q181386


The information in this article applies to:


SYMPTOMS

If you try to delete a file that is currently in use using the Setupapi.dll file and an INF script, you may receive the following error message even though the DELFLG_IN_USE or DELFLG_IN_USE1 flag was specified in the Delete File section of the INF script:

An error occurred deleting file <name>. The process cannot access the
file because it is being used by another process. (error #32).


CAUSE

This problem is caused by versions of the Setupapi.dll file earlier than version 4.0.1381.10 because these versions do not properly handle the deletion of files that are currently in use.


RESOLUTION

To resolve this issue, replace the Setupapi.dll in the Winnt\System32 folder with Setupapi.dll version 4.0.1381.10 or later. Note that installing Microsoft Internet Explorer 4.0 or later installs the correct version of the Setupapi.dll file.

For information about obtaining and installing Internet Explorer, please visit the following Microsoft Web site:

http://www.microsoft.com/ie/

Additional query words: delfiles


Keywords          : kbenv kberrmsg NTSrvWkst 
Version           : WinNT:4.0
Platform          : winnt 
Issue type        : kbprb 

Last Reviewed: February 2, 1999