Try this to hide the console window and start in the background.
[DllImport("user32.dll")] private static extern int ShowWindow(int Handle, int showState); [DllImport("kernel32.dll")] public static extern int GetConsoleWindow(); public static void HideWindow() { int win = GetConsoleWindow(); ShowWindow(win, 0); }
why aren't you using windows? the windows service starts the process in the background.
source share