Click to See Complete Forum and Search --> : exe gives error message when executed on other machines........


abidbhat
February 14th, 2008, 09:40 AM
Hello friends
my program (.exe file) is running cool in my machine but when i try to run it on other machines it does't work ................ i made it in VC#.......................can anybody tell me how to make an exe compatible with all the machines .....................


Reply is Must
Thankyou

jshultz
February 14th, 2008, 09:43 AM
Well, you need to make sure the .NET environment is installed on the other computers. That is about all I can guess since you didn't say why it isn't working/any error messages you received. "it doesn't work" doesn't really tell anyone anything.

abidbhat
February 14th, 2008, 09:52 AM
Thank You for ur reply

firstly,for an exe file there is no need to install .net framework as it doesn`t make any sense and it should run without all these....................secondly the error msg which get is something like this
".NET Initialization Error: to run this application you must first install one of the following versions of .Net framework:v2.0.57027"

jshultz
February 14th, 2008, 09:53 AM
Thank You for ur reply

firstly,for an exe file there is no need to install .net framework as it doesn`t make any sense and it should run without all these....................secondly the error msg which get is something like this
".NET Initialization Error: to run this application you must first install one of the following versions of .Net framework:v2.0.57027"

Like I told you and your error message told you, you need to install the .NET framework 2.0. The error message is blatantly telling you this.

DeepT
February 14th, 2008, 09:55 AM
Irony: See above.

No... wrong. Not only do ".exe"s need to have .Net installed, the above error is telling you the reason it is failing is because they do not have .Net installed (or a current version).

Upgrade the machine to the latest patches / .net framework and your issues will go away.

abidbhat
February 14th, 2008, 10:17 AM
thanx for ur reply but i am not completelt satisfied to u ..................
ok tell me did u mean to say if any product is made in VC# then the user (customer) should install .net framework first then only he could use it ...................does it make any sense ............

nelo
February 14th, 2008, 10:19 AM
If you've got some time you could build an installer package with Visual Studio. When you build the installer package it will give you an MSI and a setup application. When the users run the setup application it will make sure that the right version of .NET framework is installed.

jshultz
February 14th, 2008, 10:35 AM
thanx for ur reply but i am not completelt satisfied to u ..................
ok tell me did u mean to say if any product is made in VC# then the user (customer) should install .net framework first then only he could use it ...................does it make any sense ............

Seeing as how the application was developed using the .NET framework, yes, they do need to have the .NET framework in order for it to run.

MadHatter
February 14th, 2008, 11:32 AM
this thread in hilarious!

TheCPUWizard
February 14th, 2008, 12:08 PM
thanx for ur reply but i am not completelt satisfied to u ..................
ok tell me did u mean to say if any product is made in VC# then the user (customer) should install .net framework first then only he could use it ...................does it make any sense ............

Any machine which is fully up to date with ALL of the updates from either "Windows Update" or "Microsoft Update" will already have the runtime.

Any machine which is NOT up to date, represents security and other risks.

From a support standpoint, my firm first chcks if a machine has been fully updated recently (7 days for non-options, 30 days for optional). If it has not (unless the specific update has been flagged as non-impact), then the support agreement becomes a full rate charge even if the program is still within the timeframe for free support.

nelo
February 14th, 2008, 12:40 PM
thanx for ur reply but i am not completelt satisfied to u ..................
ok tell me did u mean to say if any product is made in VC# then the user (customer) should install .net framework first then only he could use it ...................does it make any sense ............

Forgive me if I am wrong but you may not fully understand what how applications developed with VC# work. Any applications that you develop in visual c# target the .NET Framework. I.e. they are NOT executables or dlls that can be run by the operating system directly. When you use something like VC# you are developing a .NET application which relies on the correct version of .NET to be installed on the target machines. Most modern machines will come with some version of .NET installed but you cannot assume that. If you want to guarantee that they will have the right version is to provide it as part of the installation of your application. An easy way to do that is build an installation package. You can do this if you Visual Studio. I'm not sure the feature is available in the Express editions or whether or not its something that can be done with the .NET Framework SDK on its own. Perhaps others can enlighten me further.

TheCPUWizard
February 14th, 2008, 12:49 PM
... If you want to guarantee that they will have the right version is to provide it as part of the installation of your application. An easy way to do that is build an installation package...

Actually that is really a fall back method.

The preferred method is to have the install check for the installation, if not found, then prompt to connect to the Microsoft site and download the latest install package for the appropriate version.

This is especially true for applications which are going to be destributed over the Web. Actually including the Runtime as part of the MSI is really bad, as it will bloat the file size (often making it thousands of times larger) for absolutely no purpose for the majority of users....

MadHatter
February 14th, 2008, 01:00 PM
you can also include an option to automatically download and install the current version of the framework (I've done this in the past w/ install shield) as part of the install script (instead of making it a prereq).