I recently "upgraded" the drive in my laptop to a Crucial M4 SSD drive. I can't be sure the SSD drive is to blame but ever since the upgrade I am having trouble with both Visual Studio and Eclipse not being able to delete .exe files on my drive that the development tools create. Everything else in the build works, it can delete and recreate new .o files but when it gets to a project's .exe file it reports that it doesn't have permission to delete the file. If I go to the directory and right-click on the file I get the same error. The right-click delete option has the UAC shield icon on it as well. Under the UAC control panel I have it set to Never.

Typically after several minutes the file can be deleted either from Explorer or the dev environment. If I go to do the delete from Window's Explorer I can see that the UAC shield icon is no longer next to the file. Does anyone know what is causing this and how I can stop Explorer from locking my .exe. files for minutes between compilations?

I tried right-clicking the folder and explicitly setting my permissions for my user to all privileges but it doesn't help.

OS: Win7 Ultimate SP1 64 bit. Laptop: Dell Studio XPS-1645. 8 Gig Ram, 256G drive (about 128G free).

  • 1
    Do you have an antivirus installed? If so, add an exclusion rule to the development environment that avoids scanning files created or modified by VS and Eclipse.
    – user3463
    Commented Aug 14, 2012 at 2:44

1 Answer 1


How did you upgrade to an SSD? (i.e. did you install Windows 7 cleanly onto the SSD and then copy your data files including the Visual Studio and Eclipse projects, or did you clone the old hard drive onto the SSD?) If the former, do you log in to your machine as a domain user, or as a local account user?

I've gone this route twice before. A couple of years ago I upgraded to an SSD on my laptop, and I did a clean install and copied my data files. I ran into the same issue you describe with Eclipse projects and the inability to modify/delete files. This was because I created a new local user account when I upgraded. It was the same name as my old account, but it was an entirely new account with a new SID and the new account did not have the same privileges as the old one. I wasn't able to solve the problem by taking ownership in the advanced security settings and changing permissions, and I eventually resorted to creating new workspaces (checking the source out from source control).

Now at a new job I again upgraded to an SSD (I have the same Crucial M4 256GB SSD as you), only this time I had been logging into the machine as a domain user, so all my files were owned by that user. When I upgraded (again doing a clean install) and copied my data files (including eclipse and visual studio projects), everything continued to work fine because they were all owned by my domain user account which was unchanged.

Unfortunately there's not an easy way to clone your local user account from your old machine to the new one. If it's too difficult to check the code out from source control again, there's a copy mechanism described here (in part 4 of the only answer to the question) that lets you reset the permissions in a new copy and then delete the old one.

Good luck, and enjoy the speed of that SSD!

  • I used Acronis to clone the old disk and then restored it on the new disk. I don't have a domain just a single laptop so I log on as a local user account. It's not that I can't delete files, it's only the .exe created by Eclipse and Visual Studio and only for a few minutes. It just occurred to me as I write this that maybe it's the Microsoft Security Essentials package. I'll have to look into that. While this is annoying the SSD is amazingly fast! Boot time went from +5 minutes to about 20 seconds.
    – Tod
    Commented Aug 14, 2012 at 18:51

You must log in to answer this question.

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