I have the following code:
info = new System.Diagnostics.ProcessStartInfo("TheProgram.exe", String.Join(" ", args));
info.CreateNoWindow = true;
info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
info.RedirectStandardOutput = true;
info.UseShellExecute = false;
System.Diagnostics.Process p = System.Diagnostics.Process.Star...
The subject doesn't say much cause it is not easy to question in one line.
I have to execute a few programs which I read from the registry. I have to read from a field where somebody saves the whole paths and arguments.
I've been using System.Diagnostics.ProcessStartInfo setting the name of the program and its arguments but I've found a ...
Hi there.
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 Calc.exe or IE. This is weird. Any ideas?
Here is the code:
System.Diagnostics.Pr...
I wrote a quick and dirty wrapper around svn.exe to retrieve some content and do something with it, but for certain inputs it occasionally and reproducibly hangs and won't finish. For example, one call is to svn list:
svn list "http://myserver:84/svn/Documents/Instruments/" --xml --no-auth-cache --username myuser --password mypassword...
I have created a new MailTo extension method for the Process class which just fills the Process with a new ProcessStartinfo which contains the required mailto arguments. I have created a method called FormatMailToArgument (Right at the end) which converts control characters to their Url Encoded equivelants and have tested this and it wor...
I'm trying to run a process as a different user that has Administrator privilege in 2 different computers running Vista and their UAC enabled but in one of them I get a Win32Exception that says "The directory name is invalid"
Can anyone tell me what is wrong with my code?
var myFile = "D:\\SomeFolder\\MyExecutable.exe";
var workingFold...
Hello:
I am trying to get the following code to work so I can call a perl script from my
c# program. I am developing using visual stdio 2008 on xp service pack3.
myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("perl.exe");
myProcessStartInfo.Arguments = @"C:\Documents and Sett...
I have a form with 3 controls:
A textbox for the user to enter
commands to send to a console
application,
A button to confirm the commands to
be sent and
A read-only textbox to display the
output from the application.
What I want is for the user to enter commands in the first textbox, press the button to enter and receive feedback vi...
Dear ladies and sirs.
I am starting a new instance of a console application from my .NET code using the Process.Start() method. I was wondering if I can specify the title of the console window hosting the spawned process. Could not find anything suitable in ProcessStartInfo.
As a last resort I can P/Invoke to talk to Win32 API directly...
Our mysql instance occaisionally locks up during backups. Currently we must VPN into the corporate network (to obtain work I.P.), remote desktop into the server, open the task manager, and manually kill the mysqld-nt.exe process.
Instead of doing all of this we are attempting to create a simple webpage that we can log into to kill and r...
I have successfully developed and deployed a ClickOnce application which registers an associated file extension, for instance *.abc. When I click on a file named x.abc or if I type x.abc from the command prompt, the ClickOnce application starts and I can retrieve the file through the dedicated API. I can also launch the application progr...
I am using a thrid party software tool (command line tool) to merge PDF files together. Using C# I am attempting to use System.Diagnostics.Process to run the executable but I am coming up with a few errors depending on the parameter setup.
If UseShellExecute = true and RedirectStandardOutput = true I get:
The Process object must ...
But it doesn't work -meaning the java code is not executed.
Although the batch file runs fine when clicked in Windows explorer or when run in command line ..
Since this works fine when the batch file is a single DOS command, I think this is somehow related to the fact that the Java code needs ~20 minutes to run.
I'm using the following ...
I try to start plink.exe (PuTTY Link, the command line utility/version of PuTTY) from a C# application to establish an SSH reverse tunnel, but it does no longer work as soon as I pass the correct parameters.
What does that mean? The following works as expected: it opens a command line window, displays that I forgot to pass the password ...
I was trying to put together an interactive Console interceptor/wrapper in C# over the weekend, by re-mixing few code samples I've found in SO and other sites.
With what I've as of now, I'm unable to read back from the console reliably. Any quick pointers?
public class ConsoleInterceptor
{
Process _interProc;
public event Act...
I have 2 programs (.exe) which I've created in .NET. We'll call them the Master and the Worker. The Master starts 1 or more Workers. The Worker will not be interacted with by the user, but it is a WinForms app that receives commands and runs WinForms components based on the commands it receives from the Master.
I want the Worker app t...
I'm looking at trying to start a process from F#, wait till it's finished, but also read it's output progressively.
Is this the right/best way to do it? (In my case I'm trying to execute git commands, but that is tangential to the question)
let gitexecute (logger:string->unit) cmd =
let procStartInfo = new ProcessStartInfo(@"C:\Pr...
I'm trying to write a utility to migrate code from our custom source control to git.
The 'commit' messages in the old system were added incrementally to a text file in the project path, so I'm using git to diff these files from one version to the next, then using that diff as a commit message.
Unsurprisingly, I'm having trouble with ac...
I want to start a child process (indeed the same, console app) with elevated privileges but with hidden window.
I do next:
var info = new ProcessStartInfo(Assembly.GetEntryAssembly().Location)
{
UseShellExecute = true, // !
Verb = "runas",
};
var process = new Process
{
StartInfo = info
};
process.Start();
and this wor...
I have a child process I spawn from my main application that needs to be run as another local user on a Windows 7 machine. I would prefer to not set a password on that user account, but it seems that creating a new process with impersonation does not allow for blank passwords or any type of null values. Anyone know if this is possible?...