Monday, January 14, 2013

The action can't be completed because the file is open in DHCP Client

Context:

Windows 2008 Server

Problem:

Cannot delete an event log

Solution:


  • Make sure that your service is not running
  • You can uninstall it or force a deletion (sc delete <service name>)
  • Remove the log registry entry under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog]
  • Restart the machine
  • Delete the log file

2 comments:

  1. Still had the problem even if the service was completely uninstalled.The deletion of the executable failed even after restarting the machine, but not sure how, it allowed me to rename the directory and then delete the directory as a whole! ;)

    ReplyDelete
  2. In my case it was Windows Event Viewer holding a reference to an executable I was trying to delete. Windows still blamed "DHCP Client".

    ReplyDelete