Home All Groups Group Topic Archive Search About

Console application will only run on machine where application was compiled

Author
27 Mar 2007 5:08 PM
rlemon27@gmail.com
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.

Author
27 Mar 2007 5:15 PM
Mubashir Khan
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 .....
<rlemo***@gmail.com> wrote in message
Show quote
news:1175015325.512832.303650@b75g2000hsg.googlegroups.com...
>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.
>
Author
27 Mar 2007 5:25 PM
rlemon27@gmail.com
Show quote
On Mar 27, 1:15 pm, "Mubashir Khan" <m***@yahoo.com> wrote:
> 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 .....<rlemo***@gmail.com> wrote in message
>
> news:1175015325.512832.303650@b75g2000hsg.googlegroups.com...
>
>
>
> >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 -

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.
Author
27 Mar 2007 5:17 PM
Rory Becker
> 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?

--
Rory
Author
27 Mar 2007 5:23 PM
rlemon27@gmail.com
On Mar 27, 1:17 pm, Rory Becker <RoryBec...@newsgroup.nospam> wrote:
Show quote
> > 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?
>
> --
> Rory

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.
Author
27 Mar 2007 6:29 PM
Rory Becker
>> 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?
>> --
>> Rory
> 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.

--
Rory
Author
27 Mar 2007 7:57 PM
Phil Wilson
You need the Visual C++ runtime support:

http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

vcredist_x86.exe, run it to install.

Phil Wilson
[MVP Windows Installer]

<rlemo***@gmail.com> wrote in message
Show quote
news:1175015325.512832.303650@b75g2000hsg.googlegroups.com...
>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.
>
Author
28 Mar 2007 5:02 AM
rlemon27@gmail.com
On Mar 27, 3:57 pm, "Phil Wilson"
<phil.wil***@wonderware.something.com> wrote:
Show quote
> 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]
>
> <rlemo***@gmail.com> wrote in message
>
> news:1175015325.512832.303650@b75g2000hsg.googlegroups.com...
>
>
>
> >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.
Author
4 Apr 2007 2:53 PM
M Kulangara
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 ??

*** Sent via Developersdex http://www.developersdex.com ***

AddThis Social Bookmark Button