7

I'm stuck with a pretty rare problem that happens on Windows 7 OS only.

Every time I'm deleting the file with *.exe extension through explorer, the file doesn't get deleted immediately. I'm forced to wait for around one-two minutes before the system will delete the file. The main problem is that I cannot develop in such situation, because every time I build my solution, the old executable gets 'deleted', but is still there. So the new one cannot be created by Visual Studio. This problem breaks the Steam update progress and a few other installers functionality too.

Fresh installed Win7 doesn't have this kind of trouble, so I guess this must be some bad registry entries or some services.

Browsing the internet for solutions I found only this: http://www.sevenforums.com/software/72091-several-minute-delay-when-deleting-any-exe-file.html. But the solution the author found is not working (change the userName :)).

Is there any ideas how to find what causes this to happen?

BTW: when I place the file into Trash bin, no delay occurs. When I delete file with Total Commander - no delay too.

Tech details: Windows 7 x64 Ultimate.

UPD: maybe some shadow copying or system restore services (though I have the system restore turned off) block the files? Can't even guess...

4
  • Try disabling the indexing service and see if that makes any difference.
    – Chris S
    Jan 17, 2011 at 16:19
  • Does the issue also occur in Safe Mode?
    – Greg Askew
    Jan 17, 2011 at 17:29
  • Yes, in safe mode everything deletes as it should. I had to load in safe mode to update Steam.
    – GregoryM
    Jan 17, 2011 at 20:39
  • The indexing service is completely turned off.
    – GregoryM
    Jan 17, 2011 at 21:17

5 Answers 5

8

GregoryM, I was having this problem also.

For a while I was using the hack method of switching back and forth between Debug and Release when the compiler was unable to replace the project.exe. Fed up with the ridiculousness of that method, I googled for the problem and stumbled upon your post. Following your sevenforums.com link, I decided to try the answer listed in the very last post (enabling Application Experience and Program Compatibility Assistant), and lo and behold it actually worked.

PCA was already enabled & running on my system, but AE was NOT enabled; after enabling AE and starting the service, I've been able to Run & Exit my program in Debug mode 30 times consecutively without any problem. I also tested making minor, rapid changes to the program in between executions (as I had been doing, trying to find a good x/y size for a console-based graph), and I've not experienced this delayed deletion since.

Perhaps that is the root of your problem also. Hope this helps.

4
  • 1
    Thank you for noticing this fact. Indeed, when I had enabled the Application Experience service the .exe files started deleting immediately. PS.: sorry for delayed reply, my main system is MacOS, so I rarely use Windows machine now :).
    – GregoryM
    Feb 6, 2011 at 17:40
  • I'm not running PCA (just can't stand it) but enabling just AE did the trick.
    – Tod
    Sep 25, 2012 at 22:14
  • 1
    I am aghast that this worked. This had been driving me nuts for weeks in a development setup. I also only needed to enable AE. Thank you! (Grrr, Windows! How much sense do you make?!) Aug 26, 2013 at 4:19
  • OMG, thank you!!! Even if this is from 2011, this still shows up in a Google search and was the answer to my hours of frustration with deleting executable files. This plagued everything, from updating executable files with application updaters that always threw errors to my own AutoHotkey re-compiles that crapped out.
    – John Suit
    Jun 6, 2016 at 23:33
2

Have you by any chance used a registry hack to completely remove Library functionality from showing up in Explorer?

If so, try the Restore Libraries registry script from here: http://media.askvg.com/downloads/2009/09/Disable%20Libraries%20in%20Windows%207.zip

It may seem like an odd recommendation but I had the same problem and noticed it came back after a fresh Win7 install when I did the remove Libraries mod.

1
  • No, as far as I remember I didn't. But I added the "Restore Default Settings.reg" to registry, rebooted and nothing changed unfortunately. The delete delay still occurs.
    – GregoryM
    Jan 22, 2011 at 18:17
0

It looks like an explorer or iexplorer (IE) plugin is messing things up. Maybe the faulty plugin is fighting with your antivirus? Try turning the antivirus off and see if that makes any difference. Also, when you are waiting 2 minutes for the delete, watch your task manager like a hawk (with the extra IO columns if needed); it might reveal a clue?

1
  • I had a Kaspersky antivirus but I disabled him to make "clear" investigation of this problem. I'm not using IE and I have no plugins installed in Explorer. Just clear explorer. Looking into IO operations I found no clue, no activity at all, except normal logging, and other usual stuff.
    – GregoryM
    Jan 17, 2011 at 22:58
0

Turn off System Restore? I suppose Windows is trying to move them to System Restore folder but the antivirus fought it somehow.

3
  • System restore was completely turned off on all drives, plus I even disabled the Shadow copying provider.
    – GregoryM
    Jan 18, 2011 at 19:12
  • So, you have disabled the antivirus, system restore, the shadow copy services, and even the indexing tool. Is there any other utilities you installed? Or perhaps some OEM stuff? Try uninstalling virtually everything in your computer except applications that clearly unrelated to utilities, antivirus, or backup (keep Visual Studio, Office, games, Photoshop, etc, but delete anything else).
    – Martheen
    Jan 18, 2011 at 21:16
  • It's not an option. As a developer I have many installed software that one way or another installs many related stuff. I can just reinstall my OS that way, it'll be much easier :), but I won't understand what caused this, so I'm searching for the way how to track the source of my trouble.
    – GregoryM
    Jan 19, 2011 at 20:05
-1

I ran into the same problem and i replaced the bin folder with a version of the application i had backup up the day before and it solved the problem. If you are having problems still then try to do the same with the (obj\debug) folder

You must log in to answer this question.

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