Questions tagged [process.start]

The Start() method on the .NET System.Diagnostics.Process class for starting applications from within a program

See https://msdn.microsoft.com/en-us/library/system.diagnostics.process.start.aspx

516 questions
2
votes
2 answers

Running a program with System.Diagnostics.Process.Start causes a MissingMethodException

I'm working on a Compact Framework 2.0 project, and I'm trying to launch a program "B" from within another program "A" using Process.Start. I've done this several times before, but I'm running into some weird issues this time. Program "B" does…
JayPea
  • 9,551
  • 7
  • 44
  • 65
2
votes
2 answers

C# start process multiple times

I do have one windows-based C# application that calls one external scan.exe file to scan one directory. Below the codes I do the process call: Process p = new Process(); p.StartInfo.FileName = @"Scan.exe"; foreach (FileInfo file in fileList) { …
JPL
  • 47
  • 2
  • 10
2
votes
4 answers

Opening pdf files using Process.Start

I am trying to open PDF files in Adobe reader using C#'s Process.Start(). When I provide a path without white spaces it works fine, but paths and pdf files containing white spaces don't open. This is my code: Button btn =…
Manish Singh
  • 360
  • 1
  • 6
  • 18
2
votes
2 answers

CreateProcessAsUser() in C# .NET Framework API (NOT Win32 API)

When I use Win32 API CreateProcessAsUser() to execute a program with impersonated user in my C# .NET project, it was successful. But I want implement that using .NET Framework API. There is a similar method like…
2
votes
2 answers

How to Schedule a Process.Start in WPF

I am trying to restart an application in WPF. I tried the following: Process.Start(Application.ExecutablePath); Process.GetCurrentProcess().Kill(); And it doesn't work because the application is setup as a single instances application. Then I…
Chi Chan
  • 11,890
  • 9
  • 34
  • 52
2
votes
2 answers

running a process in c#

i want to run a process programaticaly in c#. with process.start i can do it. but how can i prommt user when the process asks for some user input in between and continue again after providing the input.
rajshades
  • 511
  • 4
  • 9
  • 21
2
votes
2 answers

Process.Start cmd.exe won't run cmd file that is passed as agument when running in IIS

I've been searching and experimenting all morning with this one and I'm stumped. I have an aspx page running in IIS and calling the following c# function. I'm trying to have it run a cmd file and return the output from the cmd file. I've…
grumpyhoser
  • 108
  • 3
  • 6
2
votes
2 answers

Process.Start() fails for *.jpg-Files

I use the following code to open jpg-files: var file = @"C:\Users\administrator.ADSALL4SPS\Desktop\IMG_4121.JPG"; var processStartInfo = new ProcessStartInfo { Verb = "open", FileName = file }; var workDir = Path.GetDirectoryName(file); if…
BennoDual
  • 5,865
  • 15
  • 67
  • 153
2
votes
5 answers

Execute C++ exe from C# form using Process.start()

I'm trying to create a C# form app that will allow me to use all of my previous C++ programs from one central program. I'm able to open the exes with Process.Start(), however it does not compile the code correctly. Example…
Dan
  • 35
  • 2
  • 6
2
votes
3 answers

Running complex command line from C#

I'm trying to run the following command line from C#: Process.Start("C:\\Program Files\\GoToTags\\GoToTags Encoder\\GoToTags.Encoder.exe --records "{'Url':'http://petshop.intato.com/index.php?id='" + TxtBoxIDCode.Text +…
user1858059
  • 103
  • 1
  • 11
2
votes
0 answers

Start a process using System.Diagnostics.Process.Start

I am trying to execute a file stored under program files. The program is usually called from a command prompt, and output information while it is running. I want to capture the output. The code below solves half of the job: The program is executed,…
MrMox
  • 29
  • 1
2
votes
1 answer

Process.Start to open multiple web pages

I am currently using a simple button to open a webpage. void ReportingClick(object sender, EventArgs e) { System.Diagnostics.Process.Start("http://www.google.ca"); } What I want to do is get it to open 3 pages at once with the one click and I am…
user2602702
  • 113
  • 2
  • 2
  • 7
2
votes
3 answers

Specify DLLs for an exe launched with Process.Start?

I'm trying to launch an executable with Process.Start(). When the exe has no DLL dependencies, it works fine. However, when I need to include 2 DLLs, it doesn't work. I've tried setting the WorkingDirectory, and have verified that the 2 required…
mhstack
  • 21
  • 1
  • 2
2
votes
2 answers

Process.Start starts the process two times instead of one

I got two executables (Program1.exe and Program2.exe) which each open the other one when closed: Here some code from Program1.exe: private void Main_FormClosing(object sender, FormClosingEventArgs e) { Application.Exit(); …
jacobz
  • 3,191
  • 12
  • 37
  • 61
2
votes
1 answer

Process Start as domain administrator from user started process with UAC activated in domain network

I am trying to do something that, now after much banging my head against the screen, am not sure it can be done. The scenario is as follows: a windows network with a domain controller where the normal users of the PC's don't have administrative…
Aznarepse
  • 71
  • 1
  • 9