To install and run your WinForms application as a Windows Service with AlwaysUp:
-
Download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Advisor to launch the Application Advisor:
-
Click Next to move past the welcome screen:
-
Choose WinForms Application from the list of applications and click Next:
-
The Advisor will take a few seconds to examine your computer and gather information.
After that, it will prompt you to enter the full path to the executable you want to run as a service.
For this tutorial, we'll enter our sample WinForms program, "C:\Apps\winforms-program.exe".
It uses WinForms, C#.NET, ADO.NET and MS Access:
Click Next to move on.
-
On this screen, enter the password of your Windows account.
Your application should run in this context since WinForms is set up correctly there:
Click Next to move on.
-
As the screen says, the Advisor has composed the best settings to run your WinForms program as a Windows Service.
Click Next to open the Add Application window with all the particulars.
-
At this point, the Add Application window contains all the recommended settings for running your WinForms app continuously after your computer boots.
You can cycle through the tabs and review the options that have been selected for your environment.
On the General tab, feel free to change the name to something more suitable for you.
And when you're ready, click Save to record your new WinForms service:
-
In a few seconds, a new entry for your WinForms app will show up in the AlwaysUp window.
Your application is now installed as a Windows Service.
However, the state will be "Stopped" because the service isn't running yet:
-
Finally, to launch your WinForms program as a Windows Service, choose Application > Start.
The entry will soon change to "Running" and WinForms will be working away in the background:
Note that because of Session 0 isolation,
your WinForms application will not appear on your screen.
It will be running in the background, on an invisible desktop where all Windows Services operate.
If you wish to see your application, select Application > Restart in this session from the AlwaysUp menu.
That instructs AlwaysUp to stop your application in session 0 and restart it visibly on your interactive desktop.
-
That's it! Next time your computer boots, AlwaysUp will launch your WinForms application immediately, before anyone logs on.
Please reboot your computer now and confirm that everything works as expected.
And when you have some time, be sure to explore the other settings in AlwaysUp that may be helpful in your situation.
For example: