在 Windows 中隐藏文件
目前,我正在开发一个系统,该系统将从 SFX 存档中提取一些文件(将用于另一个应用程序的文件)。我想隐藏提取的文件,这样找到exe位置的人就无法获取与exe位于同一目录中的文件。我知道我可以对文件应用 attrib +h,但如果用户在 Windows 中打开“显示隐藏文件和系统文件”选项,这些文件将可见。
难道就没有什么方法可以克服这个问题吗?欢迎任何建议。
谢谢。
Currently, I'm developing a system which will extract some files from an SFX archive (files that will be used for another app). I want to make the extracted files hidden, so the person which has find the location of the exe couldn't get the files which will be in same directory with the exe. I know i can apply attrib +h to the files but if the user turns on "show hidden and system files" option in Windows, the files will be visible.
Isn't there any method to overcome this? Any suggestion is welcomed.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您正在写入磁盘,用户可以找到并读取您的文件。没有办法解决这个问题,人们可以监视应用程序运行时发生的情况,找到它正在写入哪些文件,或者只是在写入时进行拦截。考虑一下为什么您不希望用户找到您的文件。
是因为存在敏感数据,还是您不希望它们更改的内容?考虑对其进行加密,或使用校验和或散列来验证其完整性。
If you're writing to the disk, a user can find and read your file. There's no way around that, one could monitor what happens when your application is run, find what files it's writing to, or just intercept while it's being written. Consider why you don't want the user to find your files.
Is it because there's sensitive data, or things you'd rather they didn't change? Consider encrypting it, or verifying it's integrity with a checksum or hash.
我猜你可以尝试一下用户权限。但是,您需要在安装时询问管理员,然后将其对作为 PC 管理员的给定用户隐藏。
Guess you could play around with user rights. However, you'd need to ask an administrator right at install then to make it hidden from the given user who is an admin on the PC.