How to make a .exe running in background
How to make a .exe running in background
(OP)
I want a .exe (say for example dummy.exe) run in the background. It should apprear in process tab of Task Manager. It should basically do nothing...just run in the background...may be running an infinite loop until I close the program....
Does anyone know how to do this in Win XP (service pack 2).
Does anyone know how to do this in Win XP (service pack 2).
Thanks in advance
Mallik
RE: How to make a .exe running in background
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
RE: How to make a .exe running in background
It should run as the current logged-on user. There is no need to run even if a user isn't logged on.
Thanks in advance
Mallik
RE: How to make a .exe running in background
h
In C/C++, you'd call CreateProcess. Here's a sample:
h
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
RE: How to make a .exe running in background
Process process = new Process();
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError = true;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = dummy.exe;
process.StartInfo.WorkingDirectory = C:\Am;
process.Start();
When I double click on dummy.exe it gives the follwoing error message.
C:\Am\dummy.exe
The NTVDM CPU has encountered an illegal instruction.
CS:0de4 IP:0107 OP:63 65 73 73 20 Choose 'Close' to terminate the application.
Is there anything else I need to do ?
Thanks in advance
Mallik