Unable to run .exe application using C# code
- by bjh Hans
I have an exe that i need to call from my C# Program with two
arguments(PracticeId,ClaimId)
for example
Suppose if i have an application "test.exe" , whose functionality is to
make claim acording to given two argument On cmd i would normally give the following command as:
test.exe 1 2
and it works fine and performs its job of conversion.
but what if i want to execute the same thing using my c# code.
i am using the following sample code:
Process compiler = new Process();
compiler.StartInfo.FileName = "test.exe" ;
compiler.StartInfo.Arguments = "1 2" ;
compiler.StartInfo.UseShellExecute = true;
compiler.StartInfo.RedirectStandardOutput = true;
compiler.Start();
when i try to invoke the test.exe using the above code , it fails to
perform its operation of making claim txt file
what is the issue in this i don' know pls help me regarding this
whether the problem of threding or not i don't know.
Can anyone tell me if i need to add anything more to the above code
It would be great if somebody could provide some help on the above
topic.