访问C:\ Document and Settings \以及像TROODIZE应用程序(例如Treesize Application)能够

发布于 2025-01-31 08:03:22 字数 870 浏览 2 评论 0原文

我已经多次看到这个问题,但尚未给出一个明确的答案(除非不可能,但是树木却做到了……,Virusscanner也是如此)。

我正在创建一个C#应用程序,该应用程序需要在文件夹/文件上扫描驱动器,并查看它们是否已更改(通过创建校验和)。

通过扫描C:\ Document和设置\(或C:\ Users \),它无法完全访问。问题是:树木(扫描应用程序以查看使用磁盘的使用位置)能够扫描所有内容...那么他们该怎么做?

尝试了什么?

  1. 我在没有成功的情况下
  2. 使用

    directory.getFiles(< path>) and directory.getDirectories(< path; path>)获取所有文件/目录。

  3. filesystemauditrule添加到filesecurity(accessControl),该没有让我访问。

  4. 尝试将树木分解化,但它是用Delphi制成的,我可以看到……所以没有成功;

  5. 阅读多个类似的stackoverflow帖子,其中有人说:“您正在以管理员的身份运行,但是您的流程提升了吗?”我不明白。他从未解释过管理员权利与该过程提升之间是否存在差异。这些之间有区别吗? ( c#访问路径'c :\文档和设置\'被拒绝

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:

  1. Using app.manifest to requireAdministrator rights when starting the application.

  2. Using Directory.GetFiles(<path>) and Directory.GetDirectories(<path>) to obtain all files / directories.

  3. Add a FileSystemAuditRule to the FileSecurity (AccessControl) which did not give me access.

  4. Tried decompiling TreeSize, yet it has been made with Delphi as far I could see... So no success;

  5. 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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文