Windows 7 – Can’t delete exe files on Desktop

During my testing of Windows 7 I have had almost no issues to report, the only things that have been of notice have been third party or driver related. Then there’s the permissions bug, this bug is so elusive that hardly anybody has reported it and nobody has a solution, not even me.

Update 1: It appears that as of build 7068 this bug may have been fixed, see comments below for details.

Update 2: There are reports the bug has reappeared in the RTM build, it can also occur in Windows Vista but slightly less often.

Update, September 2 2009: It has been mentioned below that this website has a possible fix and that it can fix both Windows Vista and Windows 7. I don’t get this bug any more on any of my machines so I am unable to verify it however.

The issue is fairly simple, occasionally after running a file from the Desktop or a subfolder thereof I am fairly certain the file does not have to be run first though, it just happens more often if it is, (usually a setup program, but can be something as simple as a small test application) upon attempting to delete the file you get:

1. The UAC dialog wishing to confirm the deletion pops up, you click Ok (if UAC is off or disabled then go to straight to step 2)
2. An error message pops up exclaiming that you must get permission from the owner, or that you must be an administrator, it will give you the option to try again or skip.
3. Clicking try again pops up the same message, over and over and over again.
4. The IT admin in you gets confused “But I am the administrator, my user is a member of the Administrators group”
5. There must be some mistake, you attempt to grant yourself ownership of the file by right clicking and….
6. Right clicking results in a wait of more than 30 seconds during which an attempt to do anything else in the explorer window will cause Windows to assume that it has at least temporarily stopped responding, also it will then cause the menu to disappear as soon as it comes back.
7. Once you have worked this out, you click Preferences and go to the security tab where you normally change ownership, upon viewing the ownership screen you stumble upon the message Current owner: Unable to display current owner, not uncommon when the file is created on another computer etc. On attempting to change owner to yourself you get the message ‘Access Denied’.
8. You go for more advanced deletion methods, unlocker, unlock, using the command line for every windows based ownership, takedown command you can find, nothing will make the file move.
9. You may give up, don’t worry the file will magically delete itself after about 30 minutes or so, also if you restart the file will also disappear.

This is very frustrating when you are doing things that require the deletion of exe files often.

The file doesn’t work with any kind of logic, once it’s locked it will be unable to be deleted until Windows (I’m assuming it’s Windows, or whatever causes the problem in the first place) decides to delete it.

It seems that the action of attempting to delete the file in the first place is what gives it these permission-excluding superpowers, before the attempted deletion the file will act correctly, opening and closing when you want, renaming and copying as you please, obviously with no indication of what it will do if you try to delete it.

This happens on the desktop, I really haven’t experienced it anywhere else, it may also occur in the user folder but I haven’t checked.

Running as the administrator, either by opening explorer as an administrator or by enabling the administrator account and then logging in with it will give sufficient permissions to delete this file.

This is unlike any permissions issue i have ever come across on any operating system, every file is deletable, even if you have to go as the root or admin account, this file however disobeys every possible windows based and 3rd party command thrown at it.

There are no disk errors, at least none found by chkdisk, restarting and running /r on my main drive is a little counter productive since as soon as I reboot the file will be gone so there will be no file issue to be found, for the record though, I have, no issues.

This is not the same as the issues people have in Vista and Windows 7 where folders can’t be deleted sometimes, as they can be deleted simply by taking ownership of them, or even by deleting the files in the folder individually.

I have submitted a bug report.

Software I have installed and have been run:

MS Visual Studio
RealVNC
iTunes
Quicktime
Firefox
Battlefield 2
Adobe Digital Editions
TextPad
7-Zip
Foxit Reader
Avira Premium Security Suite
VideoLAN
TortoiseSVN
Windows Live, :Just the messenger
CCleaner

Most importantly, I have formatted and reinstalled Windows 7 as previously I had upgraded from Vista and there seemed to be a possible link between upgrading and getting permission issues but now I’m not so sure.

If anybody has any information on this issue please comment below, does it happen to you? Do you have a remedy that works for you? Does it happen when you have performed a full install or an upgrade from either Vista or a previous build (!important!)? Do you have any of the same software installed as me? I’m taking particular interest in CCleaner and Avira here.

Published by

TechGremlin

Owner and main content writer.

91 thoughts on “Windows 7 – Can’t delete exe files on Desktop”

  1. Update:
    I installed Win7 RC (Build 7100) this morning… and almost done with the reinstallation of my base applications. After installing VS2008+SP1, I created a Console Application. I hit Rebuid serveral times (approx. x10 and approx. 1 second apart per rebuild). When I rebuilt a little too fast, I get the same error I did in the past (about not being able to access it, etc.). But a subsequent rebuild (no more than 2 seconds after getting the build error), it builds successfully. I also tried debugging it (which causes the executable to be launched), then closing the app, then deleting all the debug files (exe included) and able to do so.

    With this quick test, I’m optimistic that the issue is gone… and 110% ECSTATIC! Hopefully, the issue doesn’t come up again… and so if you don’t hear from me again… you can assume that I’m not encountering it 🙂

    Jayson

  2. The problem (for me) happens when an app deletes a file and immediately generates it (same name). However, the first file hasn’t been fully deleted yet, so somehow that file became stuck in a transient state (neither here nor there). Because of that, the permission for that file is all screwed up and no amount of permission tweaking will bring it back. The only way is to reboot the machine. Once rebooted, the file goes away by itself. I’m using 7100 and ultimately had to turn off my Harddrive’s write cache to get it to work. No noticable performance hit, though. Hope this helps.

    David

  3. Did you do an upgrade David? Some people still experienced this on 7100 after doing an upgrade. Being fixed by turning of the write cache gives a good insight into why this is happening.

  4. Sorry, should have been clear. I did a clean install of 7100. After a couple days of testing, I can confirm that the Write Cache trick worked. I was able to turn on all other services that I thought were interfering without any problems.

    David

  5. I have the same problem on Win7 RC (7100).
    Unbelievable nobody noticed this 😉

    Disabling the write cache did not help for me.
    (But I did not restart after changing the setting – is this required?)

    If it really is caused by write caching, it may help to reduce the flush time. (If this is possible)

    Other idea:
    Which mainboards do you have? Chipset drivers installed? Especially IDE/SATA/Storage drivers?

    I’m on nForce 550, with nVidia 15.35 Win7 64bit drivers.
    (This installs an IDE storage driver)

  6. You should restart after changing the write caching setting.

    I was on Intel Raid using a few different driver versions, all experienced the same thing.

  7. I would try turning off the Application Identity service. That seems to work for me

  8. Sorry hit return too quick. I think it has to do with the applocker. I dunno if you guys have figured this out yet but I have had Win7 RC for about 4 days now and was restoring backups from XP and have been having the same problem. I went through the services list and turned off the ones I wasn’t using, tried turning off Application Identity and disabled it and i haven’t had any issues since.

  9. I have heard of the Application Identity service causing this problem before, personally I’m not sure why it would be doing this as it’s description doesn’t say anything about locking any files, unless it’s caused by a bug somewhere.

  10. Disabling the Application Identity service alone did not fix the problem for me 🙁 I am running RC1.

  11. BTW, I have noticed this does not happen on partitions formatted with FAT. It only occurs on NTFS volumes.

  12. I imagine It would require the NTFS security to lock the files, using FAT probably isn’t a good workaround though (lack of security, 4GB file limit etc).

    Did you do an upgrade from a previous version, or is it a fresh install?

  13. Hi there,
    I read all your post, i will like to say that i am using VISTA 64bit sp2, and have the same problem.
    even in fat drives. the moment i use(run) an exe file, i can’t delete it. for me it happened after i used visual studio 2008, haven’t noticed it before. the same thing can’t recompile because it can’t delete the exe file.
    only after restart.
    reformatting and reinstalling is not an option for me.

  14. I did get that problem for a short time in Vista on occasion, I don’t know of a fix for it though.

  15. Hey! Guys
    This bug occured in 7600.16385 too.
    Software I installed in common with Ben:
    Firefox
    Avira Antivir(but Professional)
    Windows Live, :Just the messenger

    I disabled some services:
    Appliction Assistant
    Windows Firewall
    Windows Defender
    peer-to-***(something like this)

    I wonder how to fix this..

  16. Same problem exists on Windows 7. 6.1 build 7600 RTM. Certain things like folders etc are not deletable unless the system is restarted, then they’ll delete.

  17. It’s not good news if this bug has appeared again in the RTM version. I am unable to test that version but as of the RC version I am still not experiencing this error anymore, which makes me think I’m either doing something different now that I wasn’t before or the bug has changed to some degree in the way it manifests itself.

  18. I have W7 7600 rtm and cannot delete certain files until I restart system. I’m using ccleaner also.

    If someone could tell How to fix this without reinstalling W7.

Leave a Reply

Your email address will not be published. Required fields are marked *