How can I make console program disappear and work in the background? I mean, I don't want to see the program, but I want to see it running in the task manager.
Thanks.
How can I make console program disappear and work in the background? I mean, I don't want to see the program, but I want to see it running in the task manager.
Thanks.
Assuming a MS Windows XP environment:
My suggestion would be to consider making a Windows Service to do what you are asking, though another possibility would be to set something up within msconfig to run the program at startup or in the startup group within the "Start->All Programs->StartUp" section.
If you are on a Mac, Linux or some other O/S, there may exist a similar function to act as a place to run programs within the background.
Assuming you cannot modify the console application and make it a windowless application you could create a windowless application that launches the console program and redirects all the standard input and output streams to "dummy" streams.
You could alternatively make one that goes to the system tray. This would also allow you to add a Kill Process directly from the system tray instead of going to the task manager. In .NET I have used the following: http://www.developer.com/net/csharp/article.php/3336751
This may offer a few advantages.
On Windows use
ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false)
to hide the console window. It will still be running in the background and is not visible on the taskbar.However you will have to run a task manager like
Taskmgr.exe
to find it and shut it down.Assuming Windows and .NET:
You could set its output type to "Windows Application", and it will not open the console window....
Or you could create a Windows Service...
If you are using Windows try
If you are using *nix