Questions tagged [processstartinfo]
269 questions
1
vote
0 answers
C# RedirectStandardOutput and RedirectStandardInput how to kill the child process when the parent process exits abnormally
My application launches a console application. Captures output and sends the console application input. This all works great. When I am done with the console application I can exit currentProcess without issue. My problem occurs when my main…

NewfrontSolutions
- 338
- 2
- 12
1
vote
2 answers
Possible Issue with ProcessStartInfo and Winword?
This code works, in that the document is successfully printed to the default printer.
public static void OpenMSWord()
{
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "WINWORD.EXE";
…

esre
- 87
- 9
1
vote
0 answers
Process.start not completing if arguments take a while to run
I have a fairly straight-forward process where I call a powershell window with a few arguments that are used to test replication for Active Directory.
As you can see below I hide this window and redirect the output of the results into the…

nejjm
- 11
- 1
1
vote
1 answer
Getting original exception when ProcessStartInfo ErrorDialog = true
When using code like this (I don't have permissions to excel.exe and it is by purpose):
ProcessStartInfo psi = new ProcessStartInfo("EXCEL.exe");
psi.UseShellExecute = true;
psi.ErrorDialog = true;
Process.Start(psi);
I'm getting nice Windows error…

user3542080
- 11
- 2
1
vote
0 answers
ProcessStartInfo change process description (Displayed in task manager)
I am currently running a process with the name notepad.exe through C# using ProcessStartInfo class, I want to change the process's description (The one where you can see in task manager) just for fun, Is it possible to do so and how?
The application…

Fukkatsu
- 149
- 1
- 12
1
vote
2 answers
Cmd command using in Asp.Net
I am using asp.net
this is my code:
string cmd = "cmd";
string enter = "/c";
string exe =
" ogr2ogr -f \"GeoJSON\" -t_srs WGS84 " +
"C:\\Users\\subhi2\\Desktop\\WebSite9\\MapInfoFile\\aghat.json " +
…

Osman Villi
- 346
- 2
- 24
1
vote
0 answers
Detaching console window after UseShellExecute
I am running a console application process attached to my C# application using UseShellExecute and CreateNoWindow options and redirecting the input and output to my application.
Now if the user tries to close my C# application while the console…

SoftEngi
- 407
- 4
- 14
1
vote
1 answer
Running cmd command from vb.net issue
I am trying to run the following code in a click event. However because it executes the command in the cmd shell, I don't know why it wont run. What I can do is open cmd.exe as Administrator by commenting out the Arguments. As well as stick these…

Benjamin Jones
- 987
- 4
- 22
- 50
1
vote
1 answer
How to change the current directory via ProcessStartInfo and cmd
At the moment I'm developing a small wrapper around CMD using ProcessStartInfo, trying to emulate the command window and adding some extra functionality that I desperately need.
This WINFORM application is a multitab app so that you can start…

Ruud
- 11
- 1
1
vote
2 answers
Starting the node js script from command prompt programatically
I have a node js script running Socket.io implementation in my web role. The only way i could find on how to start the node js script was running it in command prompt, so i created a background task in web role which runs the script in command…

Bitsian
- 2,238
- 5
- 37
- 72
1
vote
0 answers
Challenge with ProcessStartInfo Arguments ncftpget
There are several solutions posted to that explain how to pass multiple arguments to ProcessStartInfo to run a DOS command with more than one argument. None of them work in this particular case.
Trying to run ncftpget from inside a c# application -…

Alan Robbins
- 11
- 1
1
vote
1 answer
Why does this code not receive the complete output from an external command?
I am working on a tool to be able to find a PST on a specific drive. This code is taking the project path just because it's for testing purpose.
My problem is that when I try to get the output of the execution of a shell command in an external…

JF Brouillette
- 28
- 2
1
vote
1 answer
Starting Explorer with UNC Path Argument That Contains Comma Fails To Open Folder
Passing in a value with a comma in the UNC path (e.g. "\servername\Smith,John\Documents\") causes the following to start windows explorer but it opens the My Documents instead of the folder path. If I paste in the path into windows explorer's…

Flea
- 1,490
- 2
- 19
- 43
1
vote
1 answer
Fail to run SoX using Process in C#
I am trying to convert an MP3 file to GSM encoded WAV using SoX
The C# code to execute this is:
Console.WriteLine(Cfg.SoxPath); // bin/sox.exe
Console.WriteLine(args); // A rather long argument
var startInfo = new…

ANisus
- 74,460
- 29
- 162
- 158
1
vote
1 answer
How to pass command line arguments to the .exe file (e.g silent mode) using process.start
I have an vb.net windows application in this application i want run another exe file in silent mode,for this first i have run this exe file in command line it is working.But i don't know how to pass the these arguments through vb.coding…

Victor Athoti.
- 829
- 9
- 22
- 49