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
11
votes
6 answers

Process.Start(/* path to pdf */) doesn't work with Adobe Reader on Windows 8

I'm able to create PDFs in my C#/WPF application and run them with the following: Process.Start(_pathToPDFFile); This works with Adobe Acrobat, but not with Adobe Reader. When Adobe Reader is installed, Process.Start() does nothing unless the…
DaveDev
  • 41,155
  • 72
  • 223
  • 385
9
votes
7 answers

Can Process.Start() take the system PATH into account?

I've been searching and experimenting for a while with this, but I have had no luck. I am trying to make a console program to automate some tasks that I couldn't quite do with a BAT file. I want to call "signcode.exe" from the Windows SDK, the bin…
drew010
  • 68,777
  • 11
  • 134
  • 162
9
votes
5 answers

Process.Start() exits right away on Windows 7

Process.Start("d:/test.txt"); //simple .txt file works perfectly fine on Windows 8 onward but on Windows 7 (x64) it starts the process and immediately closes it. I've already tried the following: Calling through ProcessStartInfo and setting…
jwdmsd
  • 2,107
  • 2
  • 16
  • 30
9
votes
5 answers

Start Process with administrator right in C#

I have to start a command line program with System.Diagnostics.Process.Start() and run it as Administrator. This action will also be run by a Scheduled Task every day.
DomBer
  • 189
  • 1
  • 1
  • 7
9
votes
4 answers

How to pass parameters to an exe?

I am using psexec on my server to run an exe file on another server. How do I pass parameters to the other exe ? The exe that I am running on my server is psexec which in turn must run the exe named vmtoolsd.exe located on another system. How do I…
spdcbr
  • 305
  • 3
  • 5
  • 15
9
votes
2 answers

Hiding the process window, why isn't it working?

I have tried several things now to hide the window of a new process (in this case it's just notepad.exe for testing), but it just won't work regardless of what I try. I have read many posts now all saying the same so why isn't it working for me? I…
Aidal
  • 799
  • 4
  • 8
  • 33
8
votes
4 answers

How can a Windows Service start a process when a Timer event is raised?

I have created a Windows Service with Timer and in firing event of timer.Elapsed I am creating a process (System.Diagnostics.Process.Start(exe path)) at interval of 5 seconds. But this process does not get created on the firing of an event. Is there…
Sahil Verma
  • 89
  • 1
  • 2
  • 4
8
votes
3 answers

No application is associated with the specified file exception

UnhandledException: System.ComponentModel.Win32Exception: No application is associated with the specified file for this operation at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) at…
baron
  • 11,011
  • 20
  • 54
  • 88
8
votes
1 answer

Process.Start() doesn't work properly

I have program pro1.exe that reads from input file, calculates result and writes it to output file. Now I'm writing program test.exe, that tests it on different tests (fill input, run pro1 using Process.Start() and compares output with…
Vita1ij
  • 362
  • 5
  • 16
8
votes
2 answers

Starting a process with a user name and password

I know that you can run a process with a given username/password in the following way: var processInfo = new ProcessStartInfo { WorkingDirectory = workingDirectory, FileName = "a name", UserName = loggedUserName, Password =…
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
8
votes
6 answers

Which approach better: Process.Start or call DLL directly?

In our team we've faced with the choice: we need to call external third party code and process its output from our C# code. The third party code available in two forms: set of dlls and single exe file (which is probably calling these dlls on its…
shytikov
  • 9,155
  • 8
  • 56
  • 103
7
votes
3 answers

Process.Start("echo", "%cd%") throws W32Exception File Not Found

When I try to do Process.Start("echo", "%cd%") it raises a System.ComponentModel.Win32Exception: The system cannot find the file specified. When I do this manually in cmd it just works like it should. I never knew that there's a difference... Also,…
ihavenoaccount
  • 163
  • 1
  • 3
7
votes
2 answers

Process.Start is blocking/hanging randomly on some clients

(There is a very similar topic that never got solved: here) We have a big app running on several clients, but recently some of my code stopped working. Adding some debug code I found out the code stops at a call to Process.Start() (with no…
Wolf5
  • 16,600
  • 12
  • 59
  • 58
7
votes
2 answers

System.Diagnostics.Process.Start() strange behaviour

I have an application that uses Process.Start(string Filename) to open up a file. This method overload will cause the system to invoke the appropriate application based on the filename extension. In my case, it will typically be a WORD, PPT, PDF,…
Ed.
  • 928
  • 1
  • 10
  • 23
6
votes
1 answer

C# .NET 6 - How to open a link in default browser?

I want to open a website with the default browser. In .NET Framework I always used Process.Start("https://google.com") but when I do this in .NET 6, I get an exception saying that the File was not found: System.ComponentModel.Win32Exception: 'An…
Taki7o7
  • 197
  • 2
  • 11
1
2
3
34 35