Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have problem overwriting any .exe from windows explorer (drag/drop or copy paste) I receive the error message: "The action can't be completed because the folder or a file in it is open in another program". I used a sysinternal tool to check who has a hold on the said file and it is the System process.

Let say I have the following file structure rootfolder\a.exe rootfolder\someotherfolder\a.exe

1- If I open windows explorer into rootfolder and I drag/drop a.exe on someotherfolder, a.exe inside someotherfolder gets overwritten correctly.

2- If I have two instance of windows explorer opened at the same time, one inside rootfolder, one inside someotherfolder and I drag/drop a.exe over the other a.exe I receive the error message.

Now what's weird is if I am to close someotherfolder and try to repeat step 1, it fails with the same error message. System keeps a handle on the file for quite a few seconds until after I close the folder.

I tried turning indexing service off, I disabled UAC, I disabled anti-virus. I'm running windows 7 64bits on a domain, my user is admin of my machine, when I look the rights of the said file it says that my user has full control over it. I'm a bit clueless about what to do to solve this.

share|improve this question

migrated from Aug 17 '11 at 16:55

This question came from our site for system and network administrators.

up vote 4 down vote accepted

As weird as it may sound (I don't really understand) but following the steps described in this blog post corrected everything.

Basically I typed the following in an administrator Command Prompt and it all started to work magically:

net user administrator /active:yes

share|improve this answer

Give the program Unlocker a shot. Not only is it free and compatible with all versions of Windows from 2000 up to 7, it allows you to "unlock" file handles from processes without terminating them (of course, you are also given the latter option).

This is the only utility I've found to date which allows you to do this (unlock file handles without terminating processes or rebooting a computer).

As for why this is actually happening, it could be Windows trying to cache the application icon, or an external process (i.e. antivirus) scanning the file. Unlocker will tell you what process has locked the file, so it should give you an idea of why this is occuring.

share|improve this answer
I allready know which process is using it: it's the System Proess (PID:4). I've already turned off UAC/Indexing/Thumbnail generation off and still no success. But as soon as I'll get 16 rep I shall upvote you for pointing me to a tool that can unlock a file without killing the process, very useful. – Benoittr Aug 18 '11 at 20:11… suggests this might not be good idea – OJW Feb 27 '12 at 13:36

When you drag and then drop a file over a exe file, you are telling Explorer to launch the target exe file and open the dragged exe file. That is the default behavior. Which is not the case in your system.

My guess is a third party program. Any copy/drag n drop handlers installed on your system?

share|improve this answer
Actually, I'm drag/dropping on the background white space to initiate a copy/overwrite, not directly on top of the executable ICon. Also, as far as I know, I dont have any handlers installed. + I would expect that handler to appears as the one locking on the file, not the System Process. – Benoittr Aug 18 '11 at 15:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .