Questions tagged [processstartinfo]

269 questions
3
votes
0 answers

Pass arabic parameter to python script from c#

I want to pass Arabic string to python script from c#. And then I will write output to txt file. But my arabic string parameter couldn't pass correctly. It transforms to "????" question marks. I tried some code, like unicode, but it doesn't work if…
jakobiyem
  • 107
  • 1
  • 5
  • 15
3
votes
2 answers

An Interactive Console I/O Wrapper/Interceptor in C# - What is the issue?

I was trying to put together an interactive Console interceptor/wrapper in C# over the weekend, by re-mixing few code samples I've found in SO and other sites. With what I've as of now, I'm unable to read back from the console reliably. Any quick…
amazedsaint
  • 7,642
  • 7
  • 54
  • 83
3
votes
1 answer

Can C# execution of Python script be done faster by re-using process?

I'm executing a Python script from my C# console application. I made a bare solution which executes a script and solely prints a string to the output. The Python initialization seems to take some time (about .5 second) which is quite annoying if i…
Ropstah
  • 17,538
  • 24
  • 120
  • 194
3
votes
3 answers

System.Diagnostics.Process issue with WorkingDirectory

I am using a third party software tool (command line tool) to merge PDF files together. Using C# I am attempting to use System.Diagnostics.Process to run the executable but I am coming up with a few errors depending on the parameter setup. If…
mattgcon
  • 4,768
  • 19
  • 69
  • 117
3
votes
1 answer

Async ProcessStartInfo : Run cmd program to show in textbox just like cmd window in real time

I am trying to run an exe program that outputs to the command box. I am redirecting the output to show in a textbox, but it seems to only show the entire results when the program is finished. I want it to display one line at a time as it…
3
votes
1 answer

Suppress Windows Security Warning When Running 7-Zip

When trying to run the 7-Zip command line .exe from within a C# Windows service my application hangs without throwing an error. Setting breakpoints at the section below showed that the hang occurs once I hit Process.Start(p). I put the same code…
DerPflug
  • 97
  • 9
3
votes
1 answer

How can I get build/rebuild realtime output

I'm making Visual Studio package where I start devenv.exe and try to build other solution. I need to get building output in realtime, so user can see building progress/output, but I don't know how to do it and if it's even possible. I tried such way…
zdebyman
  • 550
  • 1
  • 4
  • 22
3
votes
3 answers

Prevent child process from showing a shell window in c#

I'm using ffmpeg to compile videos, and I'd like to prevent it from displaying a console when performing actions. Here's how I start ffmpeg: ProcessStartInfo si = new ProcessStartInfo(); si.Arguments = string.Format("-y -loop 1 -t " +…
Arsen Zahray
  • 24,367
  • 48
  • 131
  • 224
2
votes
4 answers

How to start a console application and prevent it from closing at the end?

I'm starting a shell script (.cmd) from my .NET application. I'd like the console window to remain open after the script has completed so that I can check for any errors. I'm trying with cmd.exe /K:my.cmd, but for some reason that does not work (the…
Vilx-
  • 104,512
  • 87
  • 279
  • 422
2
votes
2 answers

Log to text file from Process.Start

I am starting a process using Process.Start(ProcessStartInfo). It currently brings up a console window and the output of the process is displayed there until the process completes, in which case the console window closes automatically. The process…
jkh
  • 3,618
  • 8
  • 38
  • 66
2
votes
2 answers

Can't pass through "" to powershell using ProcessStartInfo arguments, C#

I'm unable to pass through an argument to powershell which contains "". When I use the equivalent code but change the application to cmd the "" are able to pass through. The argument I'd like powershell to execute is: Copy-Item -Path "{Working…
99natmar99
  • 33
  • 6
2
votes
1 answer

On Windows 10, how to send programmatically from C# a set of files to the CD/DVD recorder using the shell execution verb "SendTo"

I do have this very specific question regarding the usage of the ShellExecute verbs from inside a C# application, which uses the ProcessStartInfo class from the System.Diagnostics namespace. What I do have: a set of files (text and binary), which…
Ramanagom
  • 329
  • 2
  • 8
2
votes
1 answer

unable to run the command using c#

I need to run below TXL command using C#. basically i just run a command and store the output in temp.grm. If I run this command in cmd it works fine which means there is no error with the command. The problem is when I try to run this command using…
2
votes
3 answers

Split filename and arguments from user string

I'm writing a toolbox program in C# and on of its functions is to emulate the Windows Start menu "Run" dialog, but also to allow the user to elevate the privileges if needed. For this, I have a simple WinForm with a textBox (where the user types),…
Dédé Lateur
  • 55
  • 1
  • 7
2
votes
1 answer

cleartool not behaving the same between command prompt and from within a C# application

I am attempting to get the list of view privates in a particular directory from within a C# application. I am using the function below to make that call with: ClearCommand = "ls -r -view_only" and directory = @"E:\VobName\sampleDir". It…
JGoforth
  • 83
  • 6