Click to See Complete Forum and Search --> : Beginner: How do I get .exe's to work on any computer?


Jayhawks
July 16th, 2009, 08:00 PM
I can write scripts in C++, C, and C# or small apps but they only work on my computer and if I cut and paste the .exe it doesn't work on another computer. How do I get them to work on any computer? Is there any guide on the net to develop a program until it's a fully functional exe? When I search on google to see how this is done but I'm not sure of the terminology to search for?? "Standalone program" or ".exe c#" don't help me in google. Can anyone help me out?

RaleTheBlade
July 17th, 2009, 12:20 AM
C# executables should work on any PC so long as it has the proper version of the .NET framework installed and any libraries or resources that are needed to make it run on your machine. C/C++ applications on the other hand may require Win32 libraries, dev kits, or other things to run since they dont use a framework but most of the code in C/C++ applications should be good all the way back to Win95 however you may want to check with the API documentation on MSDN to make sure.

monalin
July 17th, 2009, 06:15 PM
You might also try building an installer for the project if you have multiple files that will need to be installed. If you're using Visual Studio you should be able to create a new Setup Project and the installer it creates will contain all the required files to run your application.

Jayhawks
July 17th, 2009, 09:02 PM
You might also try building an installer for the project if you have multiple files that will need to be installed. If you're using Visual Studio you should be able to create a new Setup Project and the installer it creates will contain all the required files to run your application.

will do thanks...if i have any questions i'll post here

darwen
July 18th, 2009, 05:58 PM
You also have to build C++ projects as a 'release' build rather than a 'debug' build to work on any machine since the debug runtimes are only (usually) installed with the Visual Studio install.

Darwen.

Arjay
July 18th, 2009, 08:09 PM
Jayhawks, besides what the other posters mentioned, it all boils down to what dependencies your exe requires. A setup program will identify the dependencies and help you get them installed on the target machine. You can run a tool called Dependency Walker (http://www.dependencywalker.com/) that helps determine what your exe needs to run.