AlwaysUp includes advanced tools to make your WinForms executable start at boot and run 24/7.
The Application Advisor will help you install your WinForms executable as a Windows Service with all our recommended settings — in just a few clicks. Simply select Advisor from the Application menu and follow the straightforward prompts.
-
Download and
install
AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Add to open the Add Application window:
-
On the General tab:
-
In the Application field, enter the full path to your WinForms application.
For this tutorial, we will be running the
CodeProject Social Club sample application, which
uses WinForms, C#.NET, ADO.NET and MS Access. The full path to the application is:
C:\WinForms\SocialClub\John.SocialClub.Desktop.exe
and that will appear throughout. No doubt the path to your application will be different!
-
In the Name field, enter the name that you will call the WinForms application in AlwaysUp.
We have entered My WinForms App but you can specify virtually anything you like.
-
Click over to the Logon tab and enter the user name and password of an account that can run your WinForms application normally.
Without this, your application may not find its settings (registry, permissions, etc.) and fail to run properly.
And if you wish to completely hide your WinForms GUI from prying eyes, you should check the When a user logs on, don't show the application's windows and tray icons (if necessary) box.
However we recommend leaving it unchecked at first - until you've gone through this process and validated that your application is working well. You can always activate this option later on.
-
If your Windows Forms program needs the network to do its work, click over to the Startup tab and check the Ensure that the Windows Networking components have started box.
-
Click the Save button. In a couple of seconds, an application called My WinForms App will show up in the AlwaysUp window.
It is not yet running though.
-
To start the WinForms application, choose Application > Start "My WinForms App". The state should transition to Running after a few seconds:
The application is currently running in Session 0. On Windows XP and Server 2003, we can see it by logging on to that session.
On Windows 8/7/Vista and Server 2012/2008, we can see it if we go to the
isolated Session 0
by selecting Tools > Switch to Session 0:
Note that if you checked the box to hide the GUI in step 5, you won't see anything in Session 0 (or be pestered by the
).
-
That's it! Next time your computer boots, your WinForms application will be launched immediately, before anyone logs on. Please reboot your PC now to test that everything works as expected.
Afterwards, be sure to explore the other settings in AlwaysUp that may be helpful in your situation.
Configure email alerts when the application fails, restart it nightly to clear out memory leaks, and much more!