Click here to Skip to main content
15,885,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am wondering if there is any tutorial/link for vb/c#/C++ to show me how to delete files and folders that are lockedby windows 7, to bypass ownership and errors such as "you must have the permission of <username>", I have downloaded a small free utility which is doing it correct but I am wondering how they do it.

Kyriakos
Posted
Comments
bbirajdar 15-Feb-13 3:23am    
Try decompiling the utility
Logi Guna 16-Feb-13 15:00pm    
If you use Unlocker, you would see that unlocker just try to find which process is locking a folder, and terminate that process. It's simpler as alternative if you fail when taking ownership (ERROR_ACCESS_DENIED)

1 solution

you need to take ownership of the files protected by the OS.

Here[^] is described how to use the API's in C++
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900