473,395 Members | 1,730 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

Hi All-

I was wondering if anyone could help me with this issue. I am trying to run this 3rd party application called "CoreFTP.exe" from within C#. I have tested my code with "Notepad.exe" and that opens up fine. I've tried it with another program executable and it works as well. When I go to run coreftp.exe, it will not work. I have even tried putting code into a .bat file and trying to execute that and it executes, but I get the same runtime error I have detailed below (both when running the .bat file and when running the below code):

Run-time Error!

C:\Program Files\CoreFTP\coreftp.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.WorkingDirectory = @"C:\Program Files\CoreFTP";
proc.StartInfo.FileName = "coreftp.exe";
proc.Start();

When I double-click on the program directly, it comes up no problem. Also, when I double-click on the .bat file it works no problem as well. What is the difference between running it in .NET and running it manually? I cannot figure this one out. Any help on this would be AWESOME!

Thank you.
Jun 28 '07 #1
2 3010
TRScheel
638 Expert 512MB
Hi All-

I was wondering if anyone could help me with this issue. I am trying to run this 3rd party application called "CoreFTP.exe" from within C#. I have tested my code with "Notepad.exe" and that opens up fine. I've tried it with another program executable and it works as well. When I go to run coreftp.exe, it will not work. I have even tried putting code into a .bat file and trying to execute that and it executes, but I get the same runtime error I have detailed below (both when running the .bat file and when running the below code):

Run-time Error!

C:\Program Files\CoreFTP\coreftp.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.WorkingDirectory = @"C:\Program Files\CoreFTP";
proc.StartInfo.FileName = "coreftp.exe";
proc.Start();

When I double-click on the program directly, it comes up no problem. Also, when I double-click on the .bat file it works no problem as well. What is the difference between running it in .NET and running it manually? I cannot figure this one out. Any help on this would be AWESOME!

Thank you.
Take off the useshellexecute line and see if that fixes it.
Jun 28 '07 #2
I tried that right now and no luck. Same error.
Jun 28 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: leroybt.rm | last post by:
Can someone tell me how to run a script from a interactive shell I type the following: >>>python filename >>>python filename.py >>>run filename >>>run filename.py >>>/run filename >>>/run...
2
by: Jenna Olson | last post by:
Hi all- I've never seen this particular issue addressed, but was wondering if there's anything to support one way or another. Say I have a class: class ManipulateData { public:...
7
by: erniedude | last post by:
Hi, I'm a newbie and I was wondering if anyone knew a (Python) script to run 4 batch files, one after the other (assuming the directories are known). It would be better if all 4 batch files...
13
by: Nemok | last post by:
Hi, Is it possible in anyway to load a file into memory and then run it from there? I am working on a file compressor (www.nemokprod.go.ro/nb.htm) that can compress and encrypt and save...
12
by: Bookreader | last post by:
I tried Googling this but I get a whole lot of replies about running the SQL statement in VB via ADO. All I want to do is run an existing ACCESS 2000 query from VB with no information returned...
21
by: sachin dooble | last post by:
is there any method where i can run my linux code that is all the a.out i made on linux to run on windows. plz tell me the way.
4
by: Wasi Rehman | last post by:
hi friends, I have one webservice which i want to run on win98 system because some reference in that webservice only run in win98, and my ASP.net application is on win2000 pro. I want to call that...
2
by: kk.simhadri | last post by:
Hi everybody, I want to run a bat file which is on different PC in the same network. I am able to run a batch file in my PC through the following code <% set wshell =...
1
by: Peter | last post by:
Hello, Our asp.net 2.0 application uses Microsoft JET provider. This driver is not available under Vista 64. However, this driver is avalable if a .NET application is forced to run as 32 bit...
1
by: GaryDean | last post by:
We have a new server2003 machine that was built like all the rest - IIS and everything needed to run asp.net apps. We have a test asp.net website that we use for new machines to make sure...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.