1

I have a program (with GUI) to run 7/24 in windows. When the pc restarts(for example after the electricity went off for a while), I want the computer to continue running the app, so I created a task scheduler basic task to run the app on startup.

  1. When the task is set to be started on system start without caring for the user, the app GUI cannot be seen since the app starts in background. When I log in I cannot see it because it is started in the background and cannot take it to front.
  2. If I select to start the app iff the specific user (btw there is only 1 user in the system) logs in, the requirement "run the app 7/24" cannot be achieved, because a manual user log in is required to start the program. So, how can we set a GUI program on windows to always work?
b.g.
  • 113

2 Answers2

0

Autologon is a Microsoft tool to automate a user login at boot:

https://learn.microsoft.com/en-us/sysinternals/downloads/autologon

Obviously this is not very secure - read through the details on the linked page. However, it is one of the only ways to get software with a gui to automatically launch at startup in a valid, viewable session.

Most software generally has its back-end service processes detached from a front-end gui, like a webserver to a browser. I recommend searching for a similar solution where possible

Cpt.Whale
  • 10,914
0

An application can be made to run as a Windows Service.

To make a Windows application run as a service, use a third-party tools, such as SrvStart (which you might need to build) or NSSM to make each application a Service. Set its Start value to 2 (automatic), or otherwise as needed.

Caveats:

  • Using a Service requires that that it be started and stopped as a Service.
  • The applications used to create a Service are considered "hack tools", since they make changes on a deep system level, not apparent to the user.
  • Use care... it is possible to make a system unusable with mistakes in this process. Make a disk image so you can roll back if there is an issue!