473,216 Members | 1,482 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,216 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 3004
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: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.