views:

196

answers:

3

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?

A: 

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).

John Feminella
+3  A: 

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...

Andrew Flanagan
+5  A: 

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.

Brian R. Bondy
Yeah it needed the Re-distributable package. I thought I made it very dependency free. The first version was, but I guess this new version isn't. Thanks.
Dan Vogel