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
3
votes
1 answer

Starting explorer.exe isn't working properly in C#

I'm trying to make a simple application in C# that allows me to kill and enable explorer.exe. I need such program so that I can play Age of Empires 2 properly, because it does not like explorer.exe for some reason (I believe it has to do with Aero).…
Burak
  • 667
  • 1
  • 11
  • 19
3
votes
2 answers

Accessing network share via Process.Start(path) using network credential

I am using this Impersonator class to impersonate a domain account to access a network share like so: using(new Impersonartor(username, domain, password)) { //Code Here } Copying the file from the network share works okay: using(new…
Ian
  • 5,625
  • 11
  • 57
  • 93
3
votes
1 answer

Process with Verb = "runas" does not start with the credentials defined in Arguments

This var psi = new ProcessStartInfo("cmd") { Verb = "runas", UseShellExecute = true, Arguments = "/user:domain\\username" }; var ps = Process.Start(psi); does not start…
Nash
  • 69
  • 9
3
votes
1 answer

Starting Firefox using Process.Start: Firefox not starting when you set Usename and Password

When I try to start Firefox using Process.Start and ProcessStartInfo (.NET) everything seems to work fine. But when I specify a username and password of another account (a member of Users), nothing seems to happen. The same code works fine with…
mrtaikandi
  • 6,753
  • 16
  • 62
  • 93
3
votes
3 answers

How to shut down from C#, Process.Start("shutdown") not working in Windows XP

After some poking around on how to reset my computer and or shut it down from C# I found this explanation on how to do that: ManagementBaseObject outParameters = null; ManagementClass sysOS = new…
Codejoy
  • 3,722
  • 13
  • 59
  • 99
3
votes
3 answers

Process.Start and Process.StartInfo not passing arguments properly

The short story is I'm writing a front-end for the emulator MAME as a study in WPF and C#. The GUI is set, it's reading cfg's properly, everything is fine except for actually launching MAME. From the command line (Windows 7) I can type the…
Aloehart
  • 337
  • 1
  • 4
  • 14
3
votes
1 answer

Process.Start() keeps running my .exe as a background process MVC ASP.Net

First off i have checked the web to try and find an answer however i have only come across people who want to run their processes in the background whereas my issue here is the opposite way round. I have entered the following code on my controller…
harrison
  • 79
  • 1
  • 11
3
votes
2 answers

Setting ProcessStartInfo.WorkingDirectory to an UNC Path

I have a utility that I have written in VB.net that runs as a scheduled tasks. It internally calls another executable and it has to access a mapped drive. Apparently windows has issues with scheduled tasks accessing mapped drives when the user is…
TJOHN
  • 33
  • 1
  • 1
  • 3
3
votes
1 answer

Process.Start() of a console app not working from Windows Service in Server 2008 R2

Update (3/20/2014 5:11PM EST): have added code to write "GotHere0.txt". Gothere0, 1, 2, 3 all appear fine. Gothere4 does not appear. Please note - this is not a duplicate - it has very subtle differences with all existing threads I have…
3
votes
2 answers

Open a text file in C# programmatically

I want to open a text file programmatically using C#. I have used : System.Diagnostics.Process.Start(test.txt); but this code is causing OS command injection problem when scanning for threats. Is there any way that i can open a text file…
3
votes
1 answer

/NetOnly Impersonation of a domain user from a non-domain PC

I believe I've read all the relevant Process.Start impersonation questions - at least all I could find via Google, but I haven't found one that matches this situation (and 90% are re: ASP which is a whole different ballgame) Scenario: We've got a…
Basic
  • 26,321
  • 24
  • 115
  • 201
3
votes
1 answer

Passing command line argument to WinForm works in Debug mode but not after publish

I have a WinForms application that accepts a command line argument by calling Environment.GetCommandLineArgs() and does something with it. It works fine in Debug mode - I enter the argument in the Debug tab of Project Properties, then run it (F5)…
kodkod
  • 1,556
  • 4
  • 21
  • 43
3
votes
2 answers

Which permissions are required to enable process.start via asp.net application?

I have an asp.net application which uses process.start to call an executable (Graphviz). All works well in my development environment, but when I move to production I'm not able to get the process to run. Here's the details. I created this simple…
DataMe
  • 95
  • 3
  • 10
3
votes
1 answer

How to pass in parameters to bat file via asp.net schtasks

I am trying to use the Windows Process.start service in Visual Studios 2005 to call Windows task scheduler (schtasks) which calls the bat file. The process works fine except that the bat file takes in parameters but it won't work when I am trying to…
3
votes
1 answer

Trying to pass spaces when launching Chrome

I'm trying to launch an external instance of Chrome from a c# Windows form. It works fine as long as there are no spaces in the path of the local html file. If there are though Chrome stops at the first space. e.g. :…
gaynorvader
  • 2,619
  • 3
  • 18
  • 32