How to make console program,to dissapear and work in background?
I mean,I don't want to see the program,but I want to see it running through the task manager.
How can I do that?
Thanks.
views:
1228answers:
5Assuming 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 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
start command.exe
If you are using *nix
nohup command
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.