Run-time error when trying to execute .exe using Process.Start

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • techgirl
    New Member
    • Jun 2007
    • 4

    Run-time error when trying to execute .exe using Process.Start

    Hi All-

    I was wondering if anyone could help me with this issue. I am trying to run this 3rd party application called "CoreFTP.ex e" from within C#. I have tested my code with "Notepad.ex e" and that works fine. I've tried it with another program executable and it works. I am receiving this error from within .NET when I try to run "CoreFTP":

    Run-time Error!

    C:\Program Files\CoreFTP\c oreftp.exe

    This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

    This is the code I'm using from within .NET:

    proc.StartInfo. UseShellExecute = true;
    proc.StartInfo. WorkingDirector y = @"C:\Program Files\CoreFTP";
    proc.StartInfo. FileName = "coreftp.ex e";
    proc.Start();

    Any help on this would be AWESOME!

    Thank you.
  • techgirl
    New Member
    • Jun 2007
    • 4

    #2
    PLEASE DISREGARD THIS! My first post and I posted it in the wrong forum. Please forgive me!!!



    Originally posted by techgirl
    Hi All-

    I was wondering if anyone could help me with this issue. I am trying to run this 3rd party application called "CoreFTP.ex e" from within C#. I have tested my code with "Notepad.ex e" and that works fine. I've tried it with another program executable and it works. I am receiving this error from within .NET when I try to run "CoreFTP":

    Run-time Error!

    C:\Program Files\CoreFTP\c oreftp.exe

    This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

    This is the code I'm using from within .NET:

    proc.StartInfo. UseShellExecute = true;
    proc.StartInfo. WorkingDirector y = @"C:\Program Files\CoreFTP";
    proc.StartInfo. FileName = "coreftp.ex e";
    proc.Start();

    Any help on this would be AWESOME!

    Thank you.

    Comment

    • weaknessforcats
      Recognized Expert Expert
      • Mar 2007
      • 9214

      #3
      Moving this to the .NET forum

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        I believe that error means the CoreFTP.exe application exited with a status other then 0.
        What happens when you run that .exe from the commandline?
        If it says something about needing specific arguments, it might return something other then a 0.

        The old int main() functions would return an int to the operating system to set the ERRORLEVEL (for microsoft) value for batch processing.

        It's not really relavent in windows as much, but the Process object could be interpreting the non-zero value to mean an error has occured

        Comment

        Working...