如何保护我的应用程序文件? [英] How can I secure my application files?

查看:99
本文介绍了如何保护我的应用程序文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在开发适用于Windows操作系统的新软件。我的应用程序需要在Computer LocalAppData中创建File,我可以这样做。



但是那些文件应该是无法删除的。







存储我的应用程序文件需要做什么?



我正在搜索嵌入式资源文件,但创建后它们无法更改。



请帮助我。这对我的应用程序来说是非常重要的问题。

我想将这些文件存储到Web中,但我的应用程序需要在线或离线工作。那么,我需要在用户计算机中存储文件但是如何?



感谢您的回答。祝你有个美好的一天...

Hi everyone,

I'm developing new software for Windows OS. My application need to create File in Computer LocalAppData and I can do it.

But that files should be cannot delete.

Or

What I need to do storage my application files?

I'm search to Embedded Resource File, but they cannot change after creation.

Please help me. It's very important issue for my app.
I think about to storage that files into Web but my application need to work Online or Offline. So, I need to storage files in user computer but how?

Thanks for answer. Have a good day...

推荐答案

你不能创建无法删除的文件,否则病毒就无法摆脱。如果用户想要删除这些文件,那么您的应用程序就会停止工作(或者您可以重新创建新的副本),这是他们的决定。
You can't create files that can't be deleted or else viruses would be impossible to get rid of. If the user wants to delete those files then your app stops working (or you can re-create fresh copies), that's their decision.


保留某些文件不被修改或删除的一种方法,无论权限如何,都要在某些进程中永久保持打开状态,以进行非共享访问(这是默认设置)。为了使此状态永久保持,代码也应该永久执行,如果此进程是Windows服务应用程序的进程,也可以将其配置为在OS启动时自动启动。当然,用户也可以停止该服务,但这样做更难;并非所有用户都能找到方法。



当然,在大多数情况下,此类行为将被视为滥用行为;为了完整,我只给了你这个想法。



-SA
One way to preserve some file from modifications or deletion, regardless of privileges, is to keep it permanently open in some process, for non-shared access (which is the default). To keep this state permanent, the code should also be executed permanently, which is possible if this process is the process of a Windows Service application, which also can be configured to auto-start on OS start. Of course, the user can also stop that service, but it's harder to do; not all users will be able to find out the way.

Of course, such course of action would be considered as abuse in most of the cases; I only gave you this idea, for completeness.

—SA


这篇关于如何保护我的应用程序文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆