Console application will only run on machine where application was compiled

  • Thread starter Thread starter rlemon27
  • Start date Start date
R

rlemon27

I have written a simple console application that will only run on my
machine. I can run the application outside of the IDE, but on other
units I get a message that the system cannot execute the command.

I installed VS 2005 on another computer to see if there was some kind
of dependency problem but this did not help.

I created a new project and compiled it with all of the default
options, no luck.

The program compiles fine and executes without any errors on my
computer. This tells me that I have some type of a dependency issue,
the question is where do I look to find the problem?

Thanks for any input.
 
best way to deploy an application is to use installer. VS2005 installer will
do a lot of things for you behind the scene. Try that .....
 
I have written a simple console application that will only run on my
machine. I can run the application outside of the IDE, but on other
units I get a message that the system cannot execute the command.

I installed VS 2005 on another computer to see if there was some kind
of dependency problem but this did not help.

I created a new project and compiled it with all of the default
options, no luck.

The program compiles fine and executes without any errors on my
computer. This tells me that I have some type of a dependency issue,
the question is where do I look to find the problem?

What error message(s) do you see on the "Other" machines?
What OS are the "Other" machines?
Is the Dotnet Framework (v2.0) installed on the "Other " machines?
 
What error message(s) do you see on the "Other" machines?
What OS are the "Other" machines?
Is the Dotnet Framework (v2.0) installed on the "Other " machines?

Windows XP and Windows Server 2003. I know for certain that one of the
units has .Net 2.0. The others supposedly do but I have not verified.

The message is "The system cannot execute the command" or close to
that. I am not at my office where I can give the exact error message.
If I double click the app in Windows explorer, I get a message that
indicates the configuration for the application is not correct.
 
best way to deploy an application is to use installer. VS2005 installer will









- Show quoted text -

I do not see an installer in VS 2005 Express C++. I may be missing
something. That happens when one works third shift. I looked for this
as the first option. I am not sure the installer works for a console
application.
 
What error message(s) do you see on the "Other" machines?
Windows XP and Windows Server 2003. I know for certain that one of the
units has .Net 2.0. The others supposedly do but I have not verified.

The message is "The system cannot execute the command" or close to
that. I am not at my office where I can give the exact error message.
If I double click the app in Windows explorer, I get a message that
indicates the configuration for the application is not correct.

First:
An exact message would be more useful as this can bea searched for in google
easily.

Note: You can get this easily from any basic messagebox (one with just an
"OK" button) by using the clipboard to Copy(CTRL-C) whilst the messagebox
has focus.

Then:
Try to create the simplest Console app possible to see if anything can run
oin the destination machine(s)

For instance, On that just display "Hello World" or calls a messagebox from
System.Windows.Forms.

Then try this application on the machine(s) which can't run your application.

After this the idea is to try incrementally adding functionality in an attempt
to find the simplest application which will still not work.

This will form the basis of a good example that we can more easily get on
board with helping you with.

This should also provide more of a clue as to what 's going wrong.
 
You need the Visual C++ runtime support:

http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F...

vcredist_x86.exe, run it to install.

Phil Wilson
[MVP Windows Installer]




I have written a simple console application that will only run on my
machine. I can run the application outside of the IDE, but on other
units I get a message that the system cannot execute the command.
I installed VS 2005 on another computer to see if there was some kind
of dependency problem but this did not help.
I created a new project and compiled it with all of the default
options, no luck.
The program compiles fine and executes without any errors on my
computer. This tells me that I have some type of a dependency issue,
the question is where do I look to find the problem?
Thanks for any input.- Hide quoted text -

- Show quoted text -

No luck with this.
 
I have a similar problem. I have a C++ console application that was
written in VC++.Net using Visual Studio 2005 that runs successfully on
my local Windows XP Pro desktop, and other Windows XP Pro boxes, but
does not work on Windows Server 2003. I have sp2 installed on the 2003
server.

The console application actually starts running on the 2003 server, but
aborts abnormally at different stages (never the same place), without
any apparent errors.

I've taken the following steps... and still haven't been able to resolve
the issue:

1.)Use a Deployment Package to install onto the 2003 server
2.)Install C++ runtime libararies on the 2003 server.

Anybody have any other suggestions ??
 
Back
Top