Error when trying to run apps on other computers  
Author Message
Alex G.





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

Hi! I've just switched to Visual C++ Express Beta. All my apps compile and work well, that's on My PC only! Whenever I move my app to another PC and try to run it It gives me this wierd error: "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this program". Am I doing something wrong. Am I not getting some files that should be with my apps, or am I not setting the linker correctly
Thanks in advance!


Visual C++5  
 
 
ctimko





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top




 
 
Alex G.





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

I'm just building Windows Forms Application.

 
 
Jonathan Caves MSFT





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

If it is a Windows Forms Application then you will, at the very least, need to install the .NET runtime on the other machine.


 
 
Alex G.





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

Thanks! I'll try it.
 
 
Alex G.





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

I tried that, but I still get the same error. There must be some other files, but I can't figure which. Any help is greately appreciated.
 
 
Jonathan Caves MSFT





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

You may also need to install the CRT libraries that ship with Visual C++ 2005 on they other machine. Are you using the Express version of Visual C++ 2005. If so then you should note that the EULA does allow for the redistribution of applications so the files that you need (the CRT redist MSM's) are missing from this version. If you are using a version other that the Express version then the redistibutable files should be in <install-point>\vc\redist

 
 
ctimko





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

Alex,
You need the following dlls from the system library
MSCOREE.DLL
ADVAPI32.DLL
RPCRT4.DLL
KERNEL32.DLL
NTDLL.DLL


I am prettty sure that Kernel32.dll and Ntdll.dll are already installed on the XP operating system


 
 
Jonathan Caves MSFT





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

Just copying system files from one machine to another is really dangerous and I cannot recommend it as a sloution to these kinds of problems.

 
 
ctimko





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

You don't have to copy these to the other computers' system folder, just put them  in the same folder as the program.


 
 
Jonathan Caves MSFT





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

An equally dangerous idea.

 
 
ctimko





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

Okay Jonathan,
Maybe you can help me understand. I have done that for several programs. I have a dependency checker and it states that are the dlls that it NEEDS to run.  What are you supposed to do, get the .NET Redistributable SDK and use that.  No offense, but Microsoft has their IDEAL workstations and you all work in near perfect workspaces.  In my world, the one I am currently in, nothing works right.  Therefore, the quickest response to missing dlls is to add them.  I have made several MFC programs and I need the MFC72D.dll and MSCVR(or something).dll.  I copy them straight from the system folder and I have NEVER had a problem.


 
 
Jonathan Caves MSFT





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

What if there is a problem with one of the DLLs Like a severe security issue for which Microsoft needs to release a patch Is the patching system going to be able to find the DLL's in the random locations you have installed them

If you need system files on a different machine (like MFC, .NET or anything else that Microsoft allows you to re-distribute) then use one of the official MSI redists. Believe me you will be saving yourself an awful lot of pain further down the road if you ever need to maintain these files.

 
 
Alex G.





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

Thanks for the advice! I will try to distrubute these files, but I'm not sure it will work. I believe they are includedd with the .NET Runtime, and I have allready installed it on other stations.
If you are reding this thread don't forget to check the 2nd page.

 
 
Alex G.





PostPosted: Visual C++ Language, Error when trying to run apps on other computers Top

If you say not to distribute these files, what am I supposed to do
Maybe stop using .NET Framework. I just want my apps to work, but how do I get them to