I have seen this question multiple times posted yet a clear answer has not been given (except that it should not be possible, yet TreeSize does it..., so does a virusscanner).
I'm creating a C# application that needs to scan a drive on folders/files and see if they are changed (by creating a checksum).
By scanning the C:\Document and Settings\ (or C:\Users\), it is not fully accessible. The thing is: TreeSize (a scanning application to see where your diskspace has been used) is able to scan everything... So how do they do it?
What have I tried without success:
Using
app.manifesttorequireAdministratorrights when starting the application.Using
Directory.GetFiles(<path>)andDirectory.GetDirectories(<path>)to obtain all files / directories.Add a
FileSystemAuditRuleto theFileSecurity (AccessControl)which did not give me access.Tried decompiling TreeSize, yet it has been made with Delphi as far I could see... So no success;
Read multiple similar Stackoverflow posts, where one said: "You are running as administrator, but is your process elevated?" Which I did not understand. He never explained if there is a difference between Administrator rights and the process being elevated. Is there a difference between those? (C# Access to the path 'C:\Documents and Settings\' is denied)