VB6将exe存储在exe中

发布于 2024-09-04 03:12:39 字数 75 浏览 3 评论 0原文

我正在制作一个应用程序,它使用单独的程序来解压缩一些文件。如何编译我的 exe 以包含其中的解压 exe,以便我只有一个文件而不是两个。

I am making an application which uses a separate program to unzip some files. How can I compile my exe to contain the unzipping exe inside so that I only have one file instead of two.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

浪荡不羁 2024-09-11 03:12:39

一个可能的解决方案可能是创建一个程序,将解压缩的 exe 附加到主可执行文件中,并写入一个标签或记录解压缩的 exe 开始的偏移量。然后,在运行时的主可执行文件中,您可以读取数据,将其写入临时文件,然后启动它。我之前已经用图像和声音数据完成了“可定制”屏幕保护程序,它也可以在 VB 中完成。

请参阅类似问题的答案,了解如何实现此目的的好算法。

A possible solution might be to create a program that appends your unzipping exe to the main executable and writes a tag or records the offset where the unzipping exe starts. Then in the main executable at run time you can read the data, write it to a temporary file, and launch it. I've done this with image and sound data for a 'customizable' screensaver before, it can probably be done in VB as well.

see this answer to a similar question for a nice algorithm on how to accomplish this.

不必了 2024-09-11 03:12:39

这实际上非常糟糕,最好使用设置。

但是,如果您坚持...您可以使用 IExpress(自 XP 起就包含在 Windows 中,在此之前从 IEAK 获取它)捆绑您的两个 EXE,并将您的“主程序”设置为“要启动的安装程序”。

这将生成一个 EXE 作为其输出。运行时,它将把打包文件解压到临时文件夹中并运行“主”EXE。

开始|运行...并输入IExpress 启动向导。

顺便说一句:这也是将 PDW 创建的文件打包到单个安装 EXE 中的好方法。

This is actually pretty awful, it is preferable to use a setup.

However, if you insist... you might bundle your two EXEs using IExpress (included in Windows since XP, before that get it from the IEAK), and set your "main program" as the "Install Program to Launch."

This will produce a single EXE as its output. When run it will extract the packaged files into a temp folder and run your "main" EXE.

Start|Run... and enter IExpress to start the wizard.

BTW: This is also a nice way to package up the files the PDW creates into a single installation EXE.

尾戒 2024-09-11 03:12:39

执行此操作的正常方法是使用包含并安装这两个文件的安装程序。

或者安装后您实际上只需要一个可执行文件?如果是这样,我不确定 VB6 是否有一个简单的解决方案,.Net 框架包含解压缩文件的功能,因此您可能可以使用它,但我认为 VB6 中没有类似的功能。

The normal way to do this would be to have a setup program that contains and installs both files.

Or do you actually need to have only one executable after it has been installed? If so I'm not sure if there is an easy solution for VB6, the .Net framework contains functionality for unzipping files so you might be able to use that, but I don't think there's anything similar in VB6.

画中仙 2024-09-11 03:12:39

使用解压库,在编译/链接时将其构建到您的应用程序中,然后部署 exe。 zsharplib 是 .NET 的一种选择。我以前使用过 vb6 解压缩库,但不记得名字了。

Use an untar library, build it into your app at compile / link, and deploy the exe. zsharplib is one option for .NET. I've used vb6 unzip libraries before, but don't recall the name.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文