System.Diagnostics.Process proc0 = new System.Diagnostics.Process();
proc0.StartInfo.FileName = "cmd";
proc0.StartInfo.WorkingDirectory = Path.Combine(curpath, "snd");
proc0.StartInfo.Arguments = omgwut;
And now for some background...
string curpath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
omgwut is something l...
Basically I'm trying to open a URL in my .NET application. This can be achieved easily by doing :
Process.Start("http://www.google.com")
However in my case the URL can be controlled by external users, therefore I don't want them to execute commands in the system by injecting meta characters etc.
So safe way would be :
Read registr...
In other words, how do people work with Git?
I just finished uploading my first project and it was far from being a straightforward task, anyway once the thing is up and running what would be a good configuration?
I cannot see how people could rely on the GitGUI or command line for their professional development work or worse code stra...
I'm writing a plugin to highlight text strings automatically as you visit a web site. It's like the highlight search results but automatic and for many words; it could be used for people with allergies to make words really stand out, for example, when they browse a food site.
But I have problem. When I try to close an empty, fresh FF wi...
I shell out an application from my VB6 app. I would then like to close it. How can I pull this off?
...
I'm quite familiar with the System.Diagnostics.Process class. But, I'm wondering about how I can monitor a specific process (i.e. Check to see if it's running every XX mins/secs). I need to be able to checking whether a process is running and if it is, continue with initialising the rest of the program.
Thanks,
-Zack
...
I have BS in Computer Science, and thus have experience developing software that runs at the command line or with a basic GUI. However, I have no experience making real, functional, websites. It has become apparent to me that I need to expand my skills to encompass web development. I have been using Ruby to develop applications, but I ...
I need to run a process, wait a few hours, kill it, and start it again. Is there an easy way that I can accomplish this with Python or Bash? I can run it in the background but how do I identify it to use kill on it?
...
hi i created a process in C# to execute an external program, i used the asynchronous methods to read on the standardoutput and all is working fine. However i have an issue, i'm printing a line indicating the process has finished. The problem is that, some times it may so happen when the data in the buffer is huge that, the process may ex...
I am generating a WPF UserControl in code that I would like to save as a DLL for use in a different application. The process of saving the DLL needs to be fully automated. Would it be better to try to do this with System.Reflection or by shelling out to csc? Or, is there an even better way to do this?
John
...
hi,
I've got two commands foo and bar.
foo runs for a long time without stdin or stdout/stderr activity. bar is a client of foo and runs with stdout/stderr but no stdin activity.
I'd like to run them from one shell, being able to kill both with ctrl-c, and to see the output from bar as it occurs.
i.e. something like this sequence
fo...
Is it possible to pause a process, save the memory contents to a file, and then later reload the file so you can continue the program?
Edit
I've been reading about this:
http://en.wikipedia.org/wiki/Setcontext
Is it possible to dump the contents of the struct, and somehow force malloc to allocate the same memory regions?
...
Hi,
As I've created the application that is hard on calculations -> lots of work to do, not very complex calculations -> it takes too long to work it out and the process is only at 45% of the CPU. Can I maximize it somehow?: to go to 90%?
...
I'm trying to find out when a process has stopped doing his work. I've been trying it with this code but it doesn't notice that the program is still running and processing a file. Probably because it's still doing things that take less then one microsecond:
TimeSpan startTime = m_Process.TotalProcessorTime;
int idleCycles = 0;
...
Hi,
I'm trying to add the info from GetGuiResources to the exception handling system of my application. Getting the values for the current process is not a big deal, but I would like to add the values for the whole system as well.
So I tried:
foreach (Process p in Process.GetProcesses())
{
gdiHandles += GetGuiResources(p.Handle, 0)...
Hi,
I try to kill all processes of a specified user.
i use
Try
Shell("C:\WINDOWS\system32\taskkill.exe /S localhost /U userx /P passwort /f /FI " & Chr(34) & "USERNAME eq userx" & Chr(34))
Catch ex As Exception
MessageBox.Show("LogoutException occurred. " + ex.Message)
End Try
But Nothing happened.
If i...
I have a long-running process in MySQL. It has been running for a week. There is one other connection, to a replication master, but I have halted slave processing so there's effectively nothing else going on.
How can I tell if this process is still working? I knew it would take a long time which is why I put it on its own database in...
I'm trying to subclass wx.Process such that I have a customized process launcher that fires events back to the main thread with data collected from the stdout stream. Is this a good way of doing things?
class BuildProcess(wx.Process):
def __init__(self, cmd, notify=None):
wx.Process.__init__(self, notify)
print "Const...
My application runs as a background process on Linux. It is currently started at the command line in a Terminal window.
Recently a user was executing the application for a while and it died mysteriously. The text:
Killed
was on the terminal. This happened two times. I asked if someone at a different Terminal used the kill command ...
I am spawning new processes in my C# application with System.Diagnostics.Process like this:
void SpawnNewProcess
{
string fileName = GetFileName();
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = fileName;
proc.Start();
proc.Exited += new EventHandler(ProcessExited);
...