Hi,
I have a simple .exe application that I need to invoke from my C#
application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to
use an ASP.net appliocation to invoke the .exe file in the future. Is this
possible and will it cause any complications?
Thanks everyone
Simon 6 8613
Hi,
Did you try System.Diagnost ics.Process.Sta rt()?
"Simon Harvey" <sh856531@micro softs_free_emai l_service.com> wrote in message
news:#I******** ******@TK2MSFTN GP09.phx.gbl...
Hi,
I have a simple .exe application that I need to invoke from my C#
application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to
use an ASP.net appliocation to invoke the .exe file in the future. Is this
possible and will it cause any complications?
Thanks everyone
Simon
Answer to the first part of the question: take a look at
System.Diagnost ics.Process.
Christian
"Simon Harvey" <sh856531@micro softs_free_emai l_service.com> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l... Hi,
I have a simple .exe application that I need to invoke from my C# application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to use an ASP.net appliocation to invoke the .exe file in the future. Is this possible and will it cause any complications?
Thanks everyone
Simon
Simon,
ASP.NET application can invoke an ece in the same way as Windows form one.
The only difference is that you will need to grant "run executable" rights
to account aspnet runs under.
Eliyahu
"Simon Harvey" <sh856531@micro softs_free_emai l_service.com> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l... Hi,
I have a simple .exe application that I need to invoke from my C# application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to use an ASP.net appliocation to invoke the .exe file in the future. Is this possible and will it cause any complications?
Thanks everyone
Simon
Hi,
simplest thing would be using the below line of code
System.Diagnost ics.Process.Sta rt(@"yourpath to your
application\Win dApp.exe");
HTH
irfan
The other responders gave you the answer.
I have a question: did you write the command line app? If so, can it be
rewritten in .NET?
That would give you some better answers when it comes to using resources,
especially if you plan to run this in a server.
Running it from a web page will work, but it won't be terribly scalable.
--- Nick
"Simon Harvey" <sh856531@micro softs_free_emai l_service.com> wrote in message
news:%2******** **********@TK2M SFTNGP09.phx.gb l... Hi,
I have a simple .exe application that I need to invoke from my C# application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to use an ASP.net appliocation to invoke the .exe file in the future. Is this possible and will it cause any complications?
Thanks everyone
Simon
Giving the ASPNET account "run executable" rights is a terrible security
hole. I would strongly suggest that you look for another solution to your
problem, perhaps rewriting the executable as a windows service (or wrapping
it on one) and having the ASP application set certain conditions (such as a
flag in the DB) that cause the code currently in the executable to run.
Eric ASP.NET application can invoke an ece in the same way as Windows form one. The only difference is that you will need to grant "run executable" rights to account aspnet runs under. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tian |
last post by:
In Windows, I have been simply using os.system() to run command line
program in python. but there will be a black console window. How can I
run the program without invoking that window? i guess there are some
function with which I can redirect the output?
|
by: Simon Harvey |
last post by:
Hi,
I have a simple .exe application that I need to invoke from my C#
application. I need to send it two strings and then get the result back.
Can anyone advise me on how this is done?
Also, I'm currently using a windows forms application but I would like to
use an ASP.net appliocation to invoke the .exe file in the future. Is this...
|
by: Steve M |
last post by:
I'm trying to invoke a Java command-line program from my Python program
on Windows XP. I cannot get the paths in one of the arguments to work
right.
The instructions for the program describe the following for the
command-line arguments:
java -jar sforcedataloader.jar -Dsalesforce.config.dir=CONFIG_DIRECTORY
They also give an example:
|
by: ~neil~ |
last post by:
hello
I'm fairly new to the language, and my problem is I'm trying to write
a program to run a command from the DOS prompt "C:>". I don't know all
the functions in "C", however there are a few under the header file
"process.h" that could be used, but I'm not really sure what they
mean. I only know them by their name <prototype declaration>....
|
by: Rob Cowie |
last post by:
Hi all,
An idea popped into my head recently for an app that would track how
much time a user spends in a particular piece of software (or at least,
for how long an application is open).
I'm assuming there is a way to do this via the command line and a unix
app, although I haven't yet invesitgated it.
My question is, can a command line...
| |
by: Gio Galma |
last post by:
how I can invoke the db2diag utility in a Windows environment?
in my D:\Program Files\IBM\SQLLIB\BIN directory I can see only
db2diag.dll, and it seems there isn't the command line version; which is
the DB2 tool that uses this dll, in order to analyze the db2diag.log?
thank you in advance for help (and please, excuse my bad english)
Jo
...
|
by: Luc The Perverse |
last post by:
Hello! You may remember me as the guy who's trying to learn C# and using
that old version 2003 of visual studio. (Although free version of command
line .NET compiler is available, so if some new feature would greatly
simplify my life, then I am not opposed)
I currently have an application that is single threaded that does batch work
(you...
|
by: tanzeem |
last post by:
i have a perl cgi script named extracter.cgi which calls a perl script(remote.pl) that resides in the same directory(/var/www/cgi-bin).The program works when run in command line . But when extracter.cgi is run as a web program it does not invoke the remote.pl in the line: `perl -e ./remote.pl`.Do i have to set any permission for the browser. All...
|
by: Ojas |
last post by:
Hi!,
I just out of curiosity want to know how top detect the client side
application under which the script is getting run. I mean to ask the
how to know whether the script is running under Command Prompt or
Browser or some other application?
Ojas.
|
by: John O'Flaherty |
last post by:
Hello.
I have an ms acess database that I use to track my mp3 files. I have
included code that lets me select and play files by invoking an mp3
player (Winamp). This is done by using visual basic command "shell
c:\winamp\winamp.exe blah-blah.mp3". It works nicely.
I can use this database from a laptop, either by copying the .mdb
file to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |