是否有可能将 .txt 文件存储在 .exe 文件中或至少将其隐藏在用户视图之外?
是否可以在 .exe 文件中包含文本文件?或者至少将其从用户视图中隐藏?我的意思是让我们举个例子,我有一个 target.exe 文件,它在其中打开并读取 data.txt 文件的内容,是的,它在我的计算机上工作得很好但是当我传输这些没有数据的 target.exe 文件时。 txt 文件传输到其他计算机,而您没有所需的 data.txt 文件。这会导致错误,我想让您知道的是 data.txt 文件包含一些信息,例如联系信息,这是机密文本。当有人运行这些 .exe 文件,他应该输入名称并显示数据关于联系信息,但仅当您有 data.txt 文件时才有效。但我希望data.txt文件被隐藏,无法正常访问。data.txt文件中的数据只能通过.exe文件访问。我该如何解决这个问题?请记住,我应该只向我的朋友提供 .exe 文件,并使用该 .exe 文件,他们可以保存他们的数据并显示联系信息。有人有想法去做吗?
Is there a possibility to include a text file in a .exe file? or atleast hide it from the user view? I mean let us take an example,I have a target.exe file in which it opens and reads the contents of a data.txt file and yes its working perfect with my computer But when i transfer these target.exe file without a data.txt file to some other computer where you dont have the required data.txt file.It results an error and the thing I want you to know is data.txt file has some information like example a contact info which is a confidential text.When someone runs these .exe file he should enter the name and the data is displayed about the contact info but it works only if you have data.txt file. But i want the data.txt file to be hidden it cannot be accessed normally.The data in data.txt file can be accessed only through .exe file.How could I solve it? and remember i should give my friends only the .exe file and using that .exe file they can save thier data and display contact info. Does any one have any idea to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,您可以将任何用户数据包含到资源中并将其与您的 .exe
Windows 中的资源< /a>
资源编译器参考
加载资源
yes, you can include any user data into recource and link it with your .exe
Resources in Windows
Resource compiler reference
LoadResource
如果 exe 打开该文件,则几乎不可能阻止用户访问该文件的内容。如果将其存储为原始资源,则可以使用资源编辑器来查看它。如果您进行某种基本加密,那么使用 ProcExplorer,人们可以查看进程中的字符串以查看程序执行时的信息。您可以使用 DRM 风格的保护,但这似乎有点矫枉过正。
一般问题的答案是肯定的,您可以将资源存储在 EXE 文件中,然后 EXE 可以在运行时打开并加载这些资源。
If the exe opens the file, then it is nearly impossible to prevent users from accessing the contents of that file. If you store it as a raw resource, then one can use a resource editor to view it. If you do some sort of basic encryption, then using ProcExplorer, one could view string in the process to see the information when the program executes. You could use DRM style protections, but that seems like overkill.
The answer to your general question is yes, you can store resources in an EXE file and then the EXE can open and load those resources at runtime.