process

Run python in a separate process

I'm looking for a quick bash script or program that will allow me to kick off a python script in a separate process. What's the best way to do this? I know this is incredibly simple, just curious if there's a preferred way to do it. ...

How to pass filename to StandardInput (Process) in C#?

Hello Guys! I'm using the native windows application spamc.exe (SpamAssassin - sawin32) from command line as follows: C:\SpamAssassin\spamc.exe -R < C:\email.eml Now I'd like to call this process from C#: Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectSta...

Do function on process close?

Say I have created a process using Process.Start();. How would I tell if it had been closed/terminated, without freezing the application. In CSharp, of course. Thanks! ...

Why does setting a form's enabled property crash the application?

private void launchbutton_Click(object sender, EventArgs e) { launchbutton.Enabled = false; Process proc = new Process(); proc.EnableRaisingEvents = true; proc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; //The arguments/filename is set here, just removed for privacy. ...

Preventing multiple process instances on Linux

What is the best way on Linux platform for the process (C++ application) to check its instance is not already running? ...

How to run a javascript when browser process is killed?

Hi, I hav onUnload="cleanup()" defined in my html body tag. The cleanup() method in javascript is function cleanup() {--clean up session--}. But when the browser is terminated by killing the process using task manager, I want to do the same action as cleanup. How can this be done? ...

How do I Continue a batch file only if a process IS running

I have successfully managed to hold a batch file until a process ends. But how do I hold a batch file until a process starts? I am working using the following code: @echo off set process_1="calc.exe" set process_2="mmc.exe" set ignore_result=INFO: set no_ignore=mmc.exe :1 for /f "usebackq" %%M in (`tasklist /nh /fi "imagename eq %pro...

How to minimize one application using c# or python?

How can I minimize Microsoft Speech Recognition: using C# or python? ...

How to start a process in the same folder as its executable

I'm trying to start an application programatically, but it always runs it in the folder of my application... For example: If my app is located in C:\MyApp\myapp.exe and the other app is in C:\OtherApp\otherapp.exe, how can I start the other app in the folder in which it resides, rather than in the folder where my app resides? Here is...

process creation

in the .net environment (C# language), how can I go about writing an application that can monitor when a process is created within the system, and when that process spawns other processes? ...

Efficient way to send files across processes

How to effectively send a file from my own process to a program such as Photoshop, Word, Paint. I do not want to save the whole file to disk and then open the program from the startup parameters using CreateProcess, ShellExecute, etc. Maybe the only way out is Memory Maped Files? Maybe I should look to COM, IPC, Pipes? ...

Is there an equivalent to C#’s Process.Start in PHP?

In .NET The Process class contains several useful properties/methods that allow developers to access process relative information. Is there any equivalent method or class in PHP? Is there any equivalent method in PHP like C# method "Process.Start()"? ...

Android GPS app not closing connection

Hi there, Fairly new to Android, so just trying to work out: I have a simple Maps app that plots a couple of locations. It's a demo for a potentially bigger app later. The one thing I would like to do is make it exit correctly. I want to assume that when a user hits the "Home" or "Back" button on the phone, that they have exited the ap...

worker process in IIS shared hosting

Can anyone tell me, is there a way to run a process in IIS shared hosting service. Suppose, the scenario is like "I want to send emails to a list of email id's after everywhere 3 hrs", so the challenge here is the process should not be invoked by a HTTP link. It should be automatic. I think we can do this by IIS worker processes. Also...

How can you start a process from asp.net without interfering with the website?

Hi, We have an asp.net application that is able to create .air files. To do this we use the following code: System.Diagnostics.Process process = new System.Diagnostics.Process(); //process.StartInfo.FileName = strBatchFile; if (File.Exists(@"C:\Program Files\Java\jre6\bin\java.exe")) { process.StartInfo.FileName = @"C:\Program Fi...

Find the associated program to open a file using Java

I wish to open a file (lets say, a word document) from a Java application using the associated program installed on the computer (in this example, using MS Word or Open Office Writer). The catch is that I want to wait until this subprocess finishes, which can be done using the waitFor() method in the Process class. String executable = ...

How to automaticly close process that uses more that specified amount of memory on windows

How to automatically close process that uses more that specified amount of memory on Windows? Is it possible to specify some amount of memory (for example 1MB) and to run some executable file with those parameters? If the process tries to allocate more than that amount of memory it should close and return some error value. Is there an ea...

Connect to an existing process

Hole thing is happening on the mac os x. Let's assume that I've opened an program by clicking on an .app icon. It's a python program with GUI which has a separate process that waits for a user input. But as I've opened it by clickin .app icon I dont have access to it's input as I would have if I opened it in Terminal. And the question ...

How to get an instance of instance System.Diagnostics.Process by processID on a remote machine

Hi all, I want to run & control a process remotely, I found the best way is the WMI APIs, The WMI gives me information about the remote process but I need more control like waiting it and getting the standard output and errors, how can I do that, and can I get an instance of System.Diagnostics.Process class by instance ID remotely? ...

Find out when all processes in (void) is done?

Hey. I need to know how you can find out when all processes (loaded) from a - (void) are done, if it's possible. Why? I'm loading in data for a UITableView, and I need to know when a Loading... view can be replaced with the UITableView, and when I can start creating the cells. This is my code: - (void) reloadData { NSAutoreleaseP...