Starting the program at Windows startup (before logging in)

I wonder if it is possible to run my application before entering Windows? In fact, this is a WinForm application (preferably, except for the Windows service).

I mean that my application should work even before entering the system, and it should sit in the system tray from which I can "show" or open the user interface.

+7
source share
5 answers

To have:

  • Something happens between system startup and user login
  • Notification area icon for interacting with

You must break the application into two separate components. One of them will be the WinForms / WPF application, which provides a notification area icon and allows the user to interact with it. The other will be a Windows service, or perhaps a scheduled task.

Once you do this, the Windows service can focus on what needs to be done before entering the system, and the notification area application can take responsibility for showing the results or something else for the end user.

To answer the question that you asked in the comments regarding reading data from the event log, yes, it is possible. There are other questions here that will give you a specific answer:

+7
source

This MS article may help, but it is a bit outdated:

http://support.microsoft.com/kb/142905

Hope it puts you on the right track.

+4
source

I think it makes no sense to get user input before the user logs in. So, if the application requires input from the user, why run it before entering the system? If the application only starts some background work, than you should use the Windows service, since this is the preferred path in the windows.

+3
source

You can plan to launch any application when the computer is turned on using the Windows Task Scheduler. There is a corresponding option. But why do you need this? You must use the service for this.

+2
source

Enter run gpedit.msc , for group policy, There you can set the launch script. The application will be launched before entering Windows, Step to create: -

 Start --> Run --> gpedit.msc --> Local Computer Policy --> Windows Settings --> Script (Startup/ShutDown), 

Add you .exe It will start before logging in. Do not try anymore in Group Policy, this may be harmful to System

By program logic, try with the registry key this value is updated in the registry, according to our program we can update the registry directly, then we can call the application

+2
source

All Articles