Questions tagged [processstartinfo]

269 questions
0
votes
1 answer

How to run an exe as a process and read its input multiple times and respond to it multiple times c#?

I am running an exe by the process like public static void executeProcessInCMD(string methodArguments) { try { methodArguments = "\"" + methodArguments + "\""; Process p = new…
0
votes
0 answers

Notepad: The application has failed to start because its side-by-side configuration is incorrect

I have a program that spawns a notepad.exe file to display some text contents. The spawning code has been working fine for years on Win10 and for 9 months on Win11. It still works, sometimes, on Win11 ever since the recent Notepad app upgrade became…
Kevin
  • 1,548
  • 2
  • 19
  • 34
0
votes
1 answer

Converting from Start-process to System.Diagnostics.Process

We have working powershell script ran through start-process $EncodedCommand =…
0
votes
1 answer

OutputDataReceived not firing as expected

I am trying to launch an external command line application and get the output of that command line application, but OutputDataReceived is not firing as expected To illustrate the problem I'm using ping.exe so others can reproduce it, but the actual…
TJ Rockefeller
  • 3,178
  • 17
  • 43
0
votes
0 answers

How to read the StandardOutput strings

Dim myprocess As New Process Dim StartInfo As New System.Diagnostics.ProcessStartInfo Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click StartInfo.FileName = "apo.exe" …
0
votes
1 answer

ProcessStartInfo argument with dash not recognized properly

I am having issues passing dashed arguments to the cmd.exe for executing a (Python) script. Code that does work (without dashed arguments): ProcessStartInfo psi = new() { FileName = "cmd.exe", …
swanna
  • 43
  • 1
  • 7
0
votes
0 answers

Starting crhome/msedge with C#

Been running Test Complete in C# with Visual Studio. The tests create an html file, and at the end of the test, we do a System.Diagnostics.Process.Start("iexplore.exe", newPath); (newPath has the url it is like…
Tony
  • 1,127
  • 1
  • 18
  • 29
0
votes
1 answer

ProcessStartInfo, python.exe: can't open file [Errno 22] Invalid argument

I have a python script 'saudilp.py' (it analyze car plate number) and i try to run this script inside c# this c# code: // 1) create process info ProcessStartInfo start = new ProcessStartInfo(); //cmd is full path to python.exe …
nawar
  • 63
  • 10
0
votes
1 answer

Powershell: system-diagnostics-processstartinfo hangs, reason unknown

Highly influenced by other questions here on Stackoverflow I have ended up with this method for starting processes from my Powershell-scripts function global:system-diagnostics-processstartinfo…
rhellem
  • 769
  • 1
  • 11
  • 26
0
votes
0 answers

Problem with process start (close instantly after start)

Okay, so i coded a small app that starts a process and then it opens openvpn. So the first 5-6 times it worked it actually starts the console and connects etc. Now i only added some more things in the form (didn't touch the process code) now when i…
user14947705
0
votes
0 answers

ProcessStartInfo hangs when UseShellExecute = true

I was running some exe with ProcessStartInfo ProcessStartInfo startInfo = new ProcessStartInfo("my.exe"); startInfo.Arguments = "foo.txt bar.txt"; startInfo.WorkingDirectory = path; Process process =…
sean
  • 1
0
votes
1 answer

C# Process.Start opens two instances of the external EXE file

I want to open an external EXE file (written in Delphi), put it on the top and in a specific location of the screen. This piece of code is used: ProcessStartInfo psi = new ProcessStartInfo("UT512_UT513.exe"); psi.WindowStyle =…
Rezaeimh7
  • 1,467
  • 2
  • 23
  • 40
0
votes
1 answer

c# Process.Start with credentials always "access is denied" when running in WPF application, Console is working fine

I'm starting an external executable (provided as part of the project solution) to get the console output to analyze the result afterwards. All is working fine, when I use a Console application to start the process using Process.Start with the…
SiL3NC3
  • 690
  • 6
  • 29
0
votes
1 answer

How can I connect an OpenVPN server without writing an ovpn file?

I have been trying to make a very basic OpenVPN client wrapper. I have made it connect to a server using the ovpn file and some start parameters, but I want to do this without a written file because my program has the connection file's text. Is…
0
votes
1 answer

ProcessStartInfo and event / async with parameter

I have an href list and I run the command it looks up at this location (svn) asynchronously. In ProcessOnErrorDataReceived I have to add s + outLine to the list. I do not know how to do this. It is possible to send s to an event or I need to call a…
Xia
  • 159
  • 10