Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Windows VB.NET
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 ", I have downloaded a small free utility which is doing it correct but I am wondering how they do it.
Posted 14-Feb-13 19:47pm
aspnet_regiis -i at 15-Feb-13 3:23am
Try decompiling the utility
Logi Guna at 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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you need to take ownership of the files protected by the OS.
Here[^] is described how to use the API's in C++

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

  Print Answers RSS
0 OriginalGriff 321
1 Sergey Alexandrovich Kryukov 286
2 RyanDev 75
3 PhilLenoir 70
4 nv3 60
0 Sergey Alexandrovich Kryukov 6,691
1 OriginalGriff 6,119
2 CPallini 2,473
3 Richard MacCutchan 1,697
4 Abhinav S 1,560

Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100