I want to run a console application on system start up without appearing it on display screen means i want to run a application as a background process.How to do this?
- 3Combine: stackoverflow.com/questions/674628/… and stackoverflow.com/questions/2763669/… or alternatively social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/….e_ne– e_ne2013-01-03 04:30:09 +00:00Commented Jan 3, 2013 at 4:30
- 1you can use Windows serviceSanthosh Nayak– Santhosh Nayak2013-01-03 04:32:52 +00:00Commented Jan 3, 2013 at 4:32
Add a comment |
3 Answers
In short: The simplest way might be to schedule task to be started from your operating system. This might be the way easiest thing to set.
You may easily run it in the background with the scheduler - How to run a .Net Console App in the background
Comments
Try this to hide the console window and run in 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 dont you try windows service ? windows service runs the process in background.