locked
Cannot instantly delete/edit .exe files. RRS feed

  • Question

  • Hello, 

    Problem is that my .exe files are held up by something invisible and only edit seeming instantly working is renaming.

    Firstly - i'm the only one using this laptop, i'm admin, running programs as admin and this still happens. Used all available Avast virus scans - found some malware, but didn't remove the problem.

    When i try to shift-delete them it takes 10 to 60 seconds and a bunch of retries for it to actually disappear... OK - i could live with it... But true problem is when trying to replace with some newer version - windows explorer says "used by other program", DevC++ says "Permission denied", Code::Blocks - "Permission denied", MS Visual C++ 2010 Express - "cannot open file"... This is extremely irritating when trying to program and debug...

    Using ASUS K55VD laptop i5 version with Win7 Pro.

    Tried stripping all non-essential or less trusted processes - didn't help.

    Tried disabling a bunch of services - didn't help.

    PLEASE HELP! ^^
    Don't want to re-install windows - have too many programs on C disk that i don't really want to loose/re-install...



    • Edited by edgetech.valkyrie Friday, February 15, 2013 5:49 PM Making text more readable i think.
    Friday, February 15, 2013 8:43 AM

Answers

  • Ubuntu on VMware is the solution... as this seems to be unsolvable short of reinstall.
    Sunday, April 7, 2013 8:16 PM

All replies

  • removed



    • Edited by ZigZag3143x Friday, February 15, 2013 9:33 AM
    Friday, February 15, 2013 9:31 AM
  • What are you trying to accomplish?  Something specific like When you are doing something then this happens.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” How to ask a question that is fixable.

    Friday, February 15, 2013 4:52 PM
  • Lets say i use DevC++ to write a program. First time it compiles the program, because it just creates an .exe file to run. But then u change code and compile again - now u get "Permission denied" error, because DevC++ tried overwriting previously generated .exe file. 

    As I said i cannot modify/delete .exe files, but only for a while. It seems to be caused by some process or service or something...

    That's the problem i try to solve. Would be nice to find a way to trace back who's preventing it or something. 

    Friday, February 15, 2013 5:06 PM
  • Does this still happen after you reboot?  I have had exes that I compiled not be overwritable because I launched them and they didn't shutdown cleanly.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” How to ask a question that is fixable.

    Friday, February 15, 2013 5:20 PM
  • Nope reboot doesn't help... I know standard ways of fixing Windows...

    By the way, i CAN rewrite after a while - seemingly when the PC feels like allowing...

    At this point looking for some tracking software or someone who knows inner-workings of windows to find the causes of this problem - who holds all the rights to .exe files for a while (I guess that's what happens).

    As for not "clean" shutdown of .exe's - just kill relevant processes in task manager - faster this way.

    Friday, February 15, 2013 5:43 PM
  • Something has a handle open to the file then.  I have seen things like AntiVirus hold handles on files.  You could do a procmon trace and see what is going on if you want to debug it.

    Troubleshooting with Process Monitor


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” How to ask a question that is fixable.

    Friday, February 15, 2013 6:50 PM
  • Wow that procmon creates huge logs fast... 

    Checked antivirus - even when fully disabled it doesn't help.

    Now sifting trough procmon logs: A LOT of registry accesses by svchost.exe to HKCR\CLSID\{54D8502C-527D-43F7-A506-A9DA075E229C} areas like: InprocServer32\(Default); InprocServer32; InProcServer32

    Edit: OK definitely didn't study enough yet... ^^ at least of what's up with these accesses. Could You give any pointers of what to look for?

    Well this problem is not present in safe mode, but not a fan of going into safe mode everytime i need to program something.

    Edit#2: now a bunch of this happens: Explorer.EXE CreateFile C:\users\edgetech\appdata\local\microsoft\office\groove\user\GFSConfig.xml PATH NOT FOUND (i deleted folder to see maybe it'd stop)

    Edit #3: What happens when i try to manually overwrite:

    22:44:08,7473442	Explorer.EXE	1656	CreateFile	C:\	SUCCESS	Desired Access: Read Data/List Directory, Read Attributes, Synchronize, Dis, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    22:44:08,7473992	Explorer.EXE	1656	FileSystemControl	C:\	INVALID DEVICE REQUEST	Control: FSCTL_LMR_QUERY_DEBUG_INFO
    22:44:08,7474185	Explorer.EXE	1656	QueryDirectory	C:\Dev-Cpp	SUCCESS	Filter: Dev-Cpp, 1: Dev-Cpp
    22:44:08,7474595	Explorer.EXE	1656	CloseFile	C:\	SUCCESS	
    22:44:08,7475646	Explorer.EXE	1656	CreateFile	C:\Dev-Cpp	SUCCESS	Desired Access: Read Data/List Directory, Read Attributes, Synchronize, Dis, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    22:44:08,7476020	Explorer.EXE	1656	FileSystemControl	C:\Dev-Cpp	INVALID DEVICE REQUEST	Control: FSCTL_LMR_QUERY_DEBUG_INFO
    22:44:08,7476184	Explorer.EXE	1656	QueryDirectory	C:\Dev-Cpp\edgetech	SUCCESS	Filter: edgetech, 1: edgetech
    22:44:08,7476484	Explorer.EXE	1656	CloseFile	C:\Dev-Cpp	SUCCESS	
    22:44:08,7578214	Explorer.EXE	1656	CreateFile	C:\Dev-Cpp\edgetech	IS DIRECTORY	Desired Access: Generic Read/Write, Dis, Options: No Buffering, Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: None, AllocationSize: n/a
    22:44:08,7579011	Explorer.EXE	1656	CreateFile	C:\Dev-Cpp\edgetech	IS DIRECTORY	Desired Access: Generic Read, Dis, Options: No Buffering, Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a
    22:44:08,7579536	Explorer.EXE	1656	CreateFile	C:\Dev-Cpp\edgetech	IS DIRECTORY	Desired Access: Read Attributes, Synchronize, Dis, Options: No Buffering, Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, Delete, AllocationSize: n/a
    22:44:08,7610124	Explorer.EXE	1656	QueryStandardInformationFile	C:\Users\edgetech\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db	SUCCESS	AllocationSize: 28.672, EndOfFile: 25.880, NumberOfLinks: 1, DeletePending: False, Directory: False
    22:44:09,4927768	Explorer.EXE	1656	CreateFile	C:\Dev-Cpp\edgetech\bugfixing.exe	SHARING VIOLATION	Desired Access: Generic Read/Write, Write DAC, Dis, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Attributes: A, ShareMode: None, AllocationSize: 15.839
    22:44:09,4932046	Explorer.EXE	1656	CreateFile	C:\Dev-Cpp\edgetech\bugfixing.exe	SHARING VIOLATION	Desired Access: Generic Read/Write, Write DAC, Dis, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Attributes: A, ShareMode: Read, Write, AllocationSize: 15.839
    22:44:09,4934562	Explorer.EXE	1656	CreateFile	C:\Dev-Cpp\edgetech	SUCCESS	Desired Access: Read Data/List Directory, Read Attributes, Synchronize, Dis, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    22:44:09,4935453	Explorer.EXE	1656	FileSystemControl	C:\Dev-Cpp\edgetech	INVALID DEVICE REQUEST	Control: FSCTL_LMR_QUERY_DEBUG_INFO
    22:44:09,4935819	Explorer.EXE	1656	QueryDirectory	C:\Dev-Cpp\edgetech\bugfixing.exe	SUCCESS	Filter: bugfixing.exe, 1: bugfixing.exe
    22:44:09,4936603	Explorer.EXE	1656	CloseFile	C:\Dev-Cpp\edgetech	SUCCESS	

    Edit #4: Again tries SAME copy action but got different results (?):
    22:52:00,9589512	DllHost.exe	1744	CreateFile	C:\Dev-Cpp\edgetech\bugfixing.exe	DELETE PENDING	Desired Access: Generic Read/Write, Write DAC, Dis, Options: Sequential Access, Synchronous IO Non-Alert, Non-Directory File, Attributes: A, ShareMode: None, AllocationSize: 15.839
    22:52:00,9593026	DllHost.exe	1744	CreateFile	C:\Dev-Cpp\edgetech\bugfixing.exe	DELETE PENDING	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    22:52:00,9594089	DllHost.exe	1744	CreateFile	C:\Dev-Cpp\edgetech\bugfixing.exe	DELETE PENDING	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    22:52:00,9595042	DllHost.exe	1744	CreateFile	C:\Dev-Cpp\edgetech\bugfixing.exe	DELETE PENDING	Desired Access: Read Attributes, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    22:52:00,9610752	DllHost.exe	1744	CreateFile	C:\	SUCCESS	Desired Access: Read Data/List Directory, Read Attributes, Synchronize, Dis, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    22:52:00,9611298	DllHost.exe	1744	FileSystemControl	C:\	INVALID DEVICE REQUEST	Control: FSCTL_LMR_QUERY_DEBUG_INFO
    22:52:00,9611516	DllHost.exe	1744	QueryDirectory	C:\Dev-Cpp	SUCCESS	Filter: Dev-Cpp, 1: Dev-Cpp
    22:52:00,9611980	DllHost.exe	1744	CloseFile	C:\	SUCCESS	
    22:52:00,9613063	DllHost.exe	1744	CreateFile	C:\Dev-Cpp	SUCCESS	Desired Access: Read Data/List Directory, Read Attributes, Synchronize, Dis, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    22:52:00,9613466	DllHost.exe	1744	FileSystemControl	C:\Dev-Cpp	INVALID DEVICE REQUEST	Control: FSCTL_LMR_QUERY_DEBUG_INFO
    22:52:00,9613654	DllHost.exe	1744	QueryDirectory	C:\Dev-Cpp\edgetech	SUCCESS	Filter: edgetech, 1: edgetech
    22:52:00,9613999	DllHost.exe	1744	CloseFile	C:\Dev-Cpp	SUCCESS	
    22:52:00,9644870	DllHost.exe	1744	CreateFile	C:\Dev-Cpp\edgetech	SUCCESS	Desired Access: Read Attributes, Read Control, Dis, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    22:52:00,9645285	DllHost.exe	1744	QuerySecurityFile	C:\Dev-Cpp\edgetech	BUFFER OVERFLOW	Information: Owner
    22:52:00,9645503	DllHost.exe	1744	QuerySecurityFile	C:\Dev-Cpp\edgetech	SUCCESS	Information: Owner
    22:52:00,9645687	DllHost.exe	1744	CloseFile	C:\Dev-Cpp\edgetech	SUCCESS	
    22:52:00,9687248	DllHost.exe	1744	QueryStandardInformationFile	C:\Users\edgetech\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db	SUCCESS	AllocationSize: 28.672, EndOfFile: 25.880, NumberOfLinks: 1, DeletePending: False, Directory: False
    

    At this point i'm definitely thinking windows re-install would be easier/faster. Gonna take a break for today and check more tomorrow with a clear head...
    Friday, February 15, 2013 7:48 PM
  • Mark Russinovich wrote the tool and he has a bunch of really interesting troubleshooting videos/blog posts (case of the unexplained) he does that might help.

    Mark's Webcasts

    What we do know from being in safemode is that something that is running normally is causing the lock.  You could also try using msconfig and doing some troubleshooting with that.

    How to perform a clean boot to troubleshoot a problem in Windows Vista, Windows 7, or Windows 8


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” How to ask a question that is fixable.


    • Edited by Ty Glander Friday, February 15, 2013 9:25 PM added links to Mark's webcasts and cleanboot troubleshooting
    • Proposed as answer by Ty Glander Monday, March 25, 2013 3:09 PM
    Friday, February 15, 2013 9:22 PM
  • Nice presentations, learnt to use filter better from there and this is what i isolated as likely cause (this is what slows it down i think)(used devcpp for this testing):

    NotifyChangeDirectory	C:\Dev-Cpp\edgetech	NOTIFY ENUM DIR	Filter: FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_LAST_WRITE	60.3608320
    
    NotifyChangeDirectory	C:\Dev-Cpp\edgetech	NOTIFY CLEANUP	Filter: FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_DIR_NAME	144.0954508

    "NOTIFY ENUM DIR" takes on average 60-ish seconds to complete during that time i can't modify file.

    Then "NOTIFY CLEANUP" doesn't really finish - this action stops when i try to run the program again (after 144 seconds (that's the time after which i compiled again)), program runs/compiles normally aaand again gets stuck for 60 seconds on "NOTIFY ENUM DIR"

    Though, now that i think of it, this, i suppose, means same thing as explorer's file/folder in use thing.

    Whats causing this?!?!? How to fix it?!?!?

    Edit #2: Idea - can i filter in procmon what references certain address?


    Saturday, February 16, 2013 10:27 AM
  • Ubuntu on VMware is the solution... as this seems to be unsolvable short of reinstall.
    Sunday, April 7, 2013 8:16 PM
  • http://www.sevenforums.com/software/72091-several-minute-delay-when-deleting-any-exe-file.html

    I found the solution to this problem here, written by MacMonsi:

    you can test my solution before changing any settings, just start the command prompt and enter:
    "net start AeLookupSvc"
    "net start PcaSvc"

    now try to delete some ".exe" file... (or a copy of some .exe) - if windows explorer deletes the files immediately (press F5 to refresh and check), then it works!

    open "services.msc" and set the startup type of the "AeLookupSvc" ("Application Experience" or "Anwendungserfahrung") and the "PcaSvc" ("Programm Compatibility Assistant" or "Programmkompatibilitäts-Assistent-Dienst") to "automatic"

    Tested it and worked beaultifully

    • Edited by bfg.9000 Friday, November 28, 2014 4:06 PM
    Friday, November 28, 2014 4:05 PM