Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a .exe running in background

Status
Not open for further replies.

Ambatim

Programmer
Feb 28, 2002
110
IN
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).

Thanks in advance
Mallik
 
Does it need to run as the current logged-on user, or should it run even if a user isn't logged on?

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hi Chip

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
 
I had created the file dummy.exe with the following in it.
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top