重命名可执行文件会导致运行时出错

发布于 2024-07-14 23:23:07 字数 286 浏览 3 评论 0原文

我创建了一个小型守护进程(基本上是一个隐藏控制台并运行的控制台应用程序)。

我需要将其发送给用户,并尝试使用不同的扩展名重命名可执行文件,通过电子邮件将其发送给用户,并让他们将其重命名为正确的名称。

当我通过电子邮件将其发送给自己进行测试时,这似乎有效。 但是,当用户尝试运行可执行文件时,会产生以下错误消息:

由于应用程序配置不正确,该应用程序无法启动。 重新安装应用程序可能会解决问题。

我究竟做错了什么?

I have created a small daemon (basically a console application that hides the console and runs).

I need to send it to a user and have tried renaming the executable with a different extension, emailing it to the user, and having them rename it to the correct name.

This seems to work when I email it to myself to test it. However, when the user tries to run the executable it produces the following error message:

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.

What am I doing wrong?

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

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

发布评论

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

评论(3

如日中天 2024-07-21 23:23:07

你缺少一些dll。

您可以使用 dependency walker 准确找出哪些。

您还可以安装 Visual Studio 可重新分发包 (x86)Visual Studio 可重新分发包 (x64) 这也可能会解决您的问题。

You are missing some dlls.

You can figure out exactly which ones using dependency walker.

You could also install the Visual Studio Re-distributable package (x86) or Visual Studio Re-distributable package (x64) and that will probably fix your problem too.

蓝色星空 2024-07-21 23:23:07

这有点有趣……几分钟前我在工作中第一次遇到这个错误。 在我们的例子中,我们使用 C++ 应用程序,并尝试在网络上的另一台计算机上运行生成的可执行文件。 您需要 Visual C++ 可再发行组件包

我在这里假设您使用的是 Visual Studio 2008——如果它是不同的版本,您可能需要它。 或者,您可以只复制带有可执行文件的 DLL,它就会像这样运行。

如果这不适用,请告诉我...

This is kind of funny... I just hit this error for the first time a few minutes ago at work. In our case, we were using a C++ application and were trying to run the resultant executable on another computer on the network. You need the Visual C++ Redistributable package.

I'm assuming here that you're using Visual Studio 2008 -- if it's a different version you may need that. Alternatively, you can just copy the DLLs with the executable and it will run like that.

Let me know if this doesn't apply...

落在眉间の轻吻 2024-07-21 23:23:07

让用户验证可执行文件的哈希值是否与您发送的哈希值相同。 防病毒程序或其他程序以试图消除恶意软件的方式破坏可执行文件的情况并不完全罕见,但同时也会破坏完全无辜的软件。

另外,请确保他们已安装任何必需的库,例如 VC++ 可再发行软件包(包括常见的 msvcrt*.dll 恶作剧)。

Have the user verify that the hash of the executable is identical to the one you sent. It's not completely unusual for antivirus or other programs to mangle executables in ways that seek to defang malicious software but which also wreck perfectly innocent software.

Also, make sure they have installed any required libraries, like the VC++ redistributable package (including the usual msvcrt*.dll shenaniganry).

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