Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make my program a background process

I wrote a program in C# .NET, that needs to be run in the background. I mean it should have any user interface. Neither a GUI nor a CLI. It is not also a windows service(because it must run only after user has logged in).

It should just run in background. example of such programs are AdobeUpdater.exe , GoogleUpdater.exe etc.

like image 971
ThinkCentre Avatar asked Feb 03 '10 17:02

ThinkCentre


2 Answers

Another option would be to create a Windows Application and set these two properties:

        this.WindowState = FormWindowState.Minimized;
        this.ShowInTaskbar = false;
like image 197
BFree Avatar answered Nov 12 '22 09:11

BFree


You can create a Console application, and then change it's properties in the project settings to a Windows application (rather than console). Or you can create a Windows Forms application that ddoesn't actually create any forms.

like image 5
Erik Funkenbusch Avatar answered Nov 12 '22 10:11

Erik Funkenbusch