Sign in to follow this  
Tera_Dragon

Program not running for some people

Recommended Posts

On some computers when trying to run the program the error "Failed to start because the application configuration was incorrect" is displayed. The only thing I can think of is that the computers that it does not run on are using WinXP SP1 and not SP2. Could this be what is causing the error? I'm using MSVC++ 2005 Express Edition if that makes any difference.

Share this post


Link to post
Share on other sites
Don't you just love window's cryptic errors?

A bit more info would probably help someone narrow down you problem. But maybe this will give you a start:

It could be looking for a mismatched version of any runtime .dll or a missing .dll
Usually a different message is displayed will dll problems, but i've had this show up once or twice.

It could be that the computers have different version of the .NET runtimes ( if your program uses them ).

Or it could be a host of other things. One thing to try would be to find someone with VS2005, and have them run the program. It could be an issue caused only by the other computer missing a file that VS2005 installed.
If that is the case, run VS' "dependency walker" tool to find what files you need to distribute.

Share this post


Link to post
Share on other sites
I've been dealing with the same problem for some time now. It is supposed to be solved if you distribute this files:

MSVCR80.DLL
MSVCP80.DLL
MICROSOFT.VC80.CRT.MANIFEST

Those files are copied from "WinSxs/Manifests" "WinSxs/x86_Microsoft.VC80.ATL_..." directories. But it doesn't always work. I downloaded your game and saw that you do distribute those files. I run it and it worked, but only because I too have VS2005 installed, and so it finds the necessary files in my "Windows/WinSxS" directory, it doesn't even use yours.

So I tried to "emulate" a computer that it doesn't have VS2005. I rename some directories in WinSxS so it can't find the files. I run your game again and I get the configuration error. I notice that your triplet of files(the 2 dlls and 1 manifest) seems to have different sizes by the files that are installed in my system(in WinSxS). So I copy these files, which have the exact same names in your directory, substituting your own files. And it worked! The exact same thing has happened to me. The files that I distribute sometimes work in other's people computers and sometimes don't.

I really don't know what the hell is going on. I'm searching the net like crazy but haven't found anything besides those blogs, and many people are having the same problems. I don't understand, why Microsoft hasn't come out and give a definite answer on this for all? I just have resorted for the time being to statically link(/MT) to the runtimes, but that's not a solution.

Share this post


Link to post
Share on other sites
Don't quote me on this, but I've read somewhere on these forums that if you either chose to embed the manifest (or not, can't quite remember) then you won't have this problem.

You can find it somewhere in your project properties.

Share this post


Link to post
Share on other sites
Instead of redistributing those DLL's, instead redistribute the "vcredist_x86.exe" file from the SDK\v2.0\BootStrapper\Packages\vcredist_x86 folder.

That should install the proper MFC/ATL/CRT runtimes in their proper locations. If you extract that exe, it contains a MSI file ... you could invoke that from your installer if you prefer.

Robert

Share this post


Link to post
Share on other sites
Quote:
Original post by mldaalder
Don't quote me on this, but I've read somewhere on these forums that if you either chose to embed the manifest (or not, can't quite remember) then you won't have this problem.

You can find it somewhere in your project properties.


This only works for statically linked programs, if you are using the DLL runtimes you cant get around the problem.

Share this post


Link to post
Share on other sites
Quote:
Original post by phantom
Hmmmm, I direct you to my
href="http://www.gamedev.net/community/forums/topic.asp?topic_id=357914&whichpage=1?">reply here, which

refernces a different blog page on the matter
and one which applies to the full release of VS2005.

And yes, it works, even to distro to Win2000 systems


Using this solution, do I have to still redistribute the dlls and the manifest and the .msi, or just the .msi will suffice?

Also, it's weird that part on his troubleshooting section:

Quote:

Error message CNDL0054 from candle.exe
candle.exe : error CNDL0054 : The document element name 'Include' is invalid. A WiX source file must use 'Wix' as the document element name.

Cause: you have tried executing >candle.exe vccrt.wxi -out vccrt.wixobj instead of >candle.exe vccrt.wxs -out vccrt.wixobj



Hmm, I wonder why I did that dude. Is it maybe because you told me so? :)

Share this post


Link to post
Share on other sites
Just the MSI file, which needs to be run on the target computer to install the DLLS into the correct locations.

btw, I downloaded the WiX VS plugin, works fine with VS2005,I didnt feel like playing with the command line one [grin]

Share this post


Link to post
Share on other sites
Thanks man, it seems to work. One final little question, since I can't test it right now on other computers:

I wanted to test if the installation it works in other computers, so I renamed my installed MSVCR80.DLL to MSVCR800.DLL. Naturally, the application does not run. I choose the .msi and double-click it. Nothing happens, and still the app does not run. I choose the .msi, right-click it and choose "Fix" or "Upgrade"(I have a Greek Version of WinXP, and don't know how it translates to English). I see that a new MSVCR80.DLL is installed, and the app is running. I assume this happens because I have already VS2005 installed? In computers which don't have it at all, double-clicking the .msi will work, right?

Share this post


Link to post
Share on other sites
Quote:
Original post by phantom
Hmmmm, I direct you to my reply here, which refernces a different blog page on the matter and one which applies to the full release of VS2005.

And yes, it works, even to distro to Win2000 systems


i was about to post that link. [grin]

there's info on msdn somewhere that says you can just drop the runtimes into the folder with your app, but it's 100% wrong. the dll's can only be loaded from the SxS directories. following the instructions in that blog to make an installer will solve the problem if you aren't statically linking. (static linking is generally a bad idea. if there's a critical security update for the runtimes, your app will still be using the static linked unpatched version.)

Share this post


Link to post
Share on other sites
Quote:
Original post by mikeman
Thanks man, it seems to work. One final little question, since I can't test it right now on other computers:

I wanted to test if the installation it works in other computers, so I renamed my installed MSVCR80.DLL to MSVCR800.DLL. Naturally, the application does not run. I choose the .msi and double-click it. Nothing happens, and still the app does not run. I choose the .msi, right-click it and choose "Fix" or "Upgrade"(I have a Greek Version of WinXP, and don't know how it translates to English). I see that a new MSVCR80.DLL is installed, and the app is running. I assume this happens because I have already VS2005 installed? In computers which don't have it at all, double-clicking the .msi will work, right?


i made the installer and tested it on other pc's running xp pro sp2 and xp home sp2 and it worked perfectly.

Share this post


Link to post
Share on other sites
When I double-click the MSI file on my computer (with VS2005 installed) it briefly shows a progress dialog, then goes away without any prompting. Right-clicking the MSI file shows "Install", "Uninstall" and "Repair".

The only reason I can think of that the MSI file didn't install for you when double-clicked is that perhaps the file associations for MSI files have been altered in some way.

Robert

Share this post


Link to post
Share on other sites
Quote:

The only reason I can think of that the MSI file didn't install for you when double-clicked is that perhaps the file associations for MSI files have been altered in some way.


Yeah, I totally forgot that I had aldreadt installed the same .msi some days ago and then screwed with the dlls today. I've figured it out now, thanks.

Btw, "vcredist_x86.exe" which you mentioned does not exist in my hard drive, even though I've installed everything. I've heard from other people too that it only comes with Professional Edition, and we who use Express have to build it manually, like that blog says.

Share this post


Link to post
Share on other sites
Quote:
Original post by mikeman
Btw, "vcredist_x86.exe" which you mentioned does not exist in my hard drive, even though I've installed everything. I've heard from other people too that it only comes with Professional Edition, and we who use Express have to build it manually, like that blog says.


that is correct. fortunately making the installer was simple and only took a few minutes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this