I can't seem to find out how to write a background/system process that you can't see...
Btw I'm using Windows... I see their/your server thinks I'm using Linux...
For Windows service, there are some Windows specific API you need to call in your application so that it don't show up in CMD/Terminal.
Basically you control your Windows Service via the Control Panel -> Services. I believe there is a ServiceManager that manages all the services. So your program must behave well and react according to the ServiceManager calling your program methods.
Just imagine ServiceManager as a container application and all services "reside" inside this container. Therefore all services must behave when say ServiceManager call you to "stop" "pause" "restart", your service methods must implement accordingly.
I havn't even watched this yet but it might be my answer: http://www.youtube.com/watch?v=bD93DX8Ph-c
Umm... No.
Maybe this will work:
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <iostream>
int main()
{
HWND hWnd = GetConsoleWindow();
ShowWindow( hWnd, SW_HIDE );
// Some code
return 0;
}
I know what the services.msc is/does, but that's just for automatically running programs and other things
Isn't that what you want ? Auto-run the program and it stay on there acting like a background process until you use Control Panel -> Services to stop or even remove it.
You mean the Windows service is not equivalent to background process? A lot of device drivers we install also uses this feature.
Or you are looking at putting your program in some startup folder ? Then you need to check another set of Windows API that allow you to "nest" your application in the taskbar below right.