Starting controller as a service on Windows without using nssm.exe?

Starting controller as a service on Windows without using nssm.exe?

Starting controller as a service on Windows without using nssm.exe?
Starting controller as a service on Windows without using nssm.exe?
2024-07-10 22:54:40 - last edited 2024-07-11 23:01:59
Tags: #Controller #Windows Service

Regarding https://www.tp-link.com/us/support/faq/2915/ the recommendation is to use nssm.exe.  However that program is no longer being maintained and is considered a mild to moderate security risk.

 

I tried creating a service manually with

 

sc create start= auto binPath= <path to start.bat>

 

but service startup always fails with

 

Windows could not start the Omada Controller service on Local Computer
Error 1053: The service did not respond to the start or control request in a timely fashion

 

Suggestions on how to proceed?

  0      
  0      
#1
Options
1 Accepted Solution
Re:Starting controller as a service on Windows without using nssm.exe?-Solution
2024-07-11 23:01:32 - last edited 2024-07-11 23:05:57

SOLUTION: If you have access to the system's group policy via gpedit, there are two policy entries that can be used to re-logon the last user, as documented in this answer on superuser.com, aka ARSO

 

Setting these two group policy entries will cause the last logged-on user to be re-logged on at the next restart/cold boot, but leaves the display locked.  I just tested it by

 

  1. Setting the policy entries
  2. Putting the Omada Controller shortcut in the shell:startup folder
  3. Restarting

 

This works well for a system that typically has only one logged on user, who runs the controller, The only caveat is that if the system is shutdown with no user logged in, then on restart no automatic login occurs. 

 

Note that this is merely a stopgap, TP-Link should provide a way to install the controller as a service without requiring possibly dodgy software (nssm).

Recommended Solution
  0  
  0  
#4
Options
4 Reply
Re:Starting controller as a service on Windows without using nssm.exe?
2024-07-11 08:29:20 - last edited 2024-07-11 08:34:57

Hi  @jhg6308 

 

Currently, only nssm is available.

You may google it to find another way to achieve it. Below is one of the results I got.

https://support.microsoft.com/en-us/windows/add-an-app-to-run-automatically-at-startup-in-windows-10-150da165-dcd9-7230-517b-cf3c295d89dd

  0  
  0  
#2
Options
Re:Starting controller as a service on Windows without using nssm.exe?
2024-07-11 15:57:07 - last edited 2024-07-11 15:57:36

  @Vincent-TP That sets up an app to run after the user logs in, which is different from starting as a service. A service can be configured to start on bootup without a user logged in.

  0  
  0  
#3
Options
Re:Starting controller as a service on Windows without using nssm.exe?-Solution
2024-07-11 23:01:32 - last edited 2024-07-11 23:05:57

SOLUTION: If you have access to the system's group policy via gpedit, there are two policy entries that can be used to re-logon the last user, as documented in this answer on superuser.com, aka ARSO

 

Setting these two group policy entries will cause the last logged-on user to be re-logged on at the next restart/cold boot, but leaves the display locked.  I just tested it by

 

  1. Setting the policy entries
  2. Putting the Omada Controller shortcut in the shell:startup folder
  3. Restarting

 

This works well for a system that typically has only one logged on user, who runs the controller, The only caveat is that if the system is shutdown with no user logged in, then on restart no automatic login occurs. 

 

Note that this is merely a stopgap, TP-Link should provide a way to install the controller as a service without requiring possibly dodgy software (nssm).

Recommended Solution
  0  
  0  
#4
Options
Re:Starting controller as a service on Windows without using nssm.exe?
2024-07-12 01:54:13

 Hi @jhg6308 

 

Thank you so much for sharing. and we certainly appreciate all your feedback. While we don't have any specific details that I can share around if this feature can come to all the Omada controller, or when it might, I'll make sure to log this feature request and pass it along to the R&D team.
Feel free to let us know of any other feature requests you may have, we’d be happy to send them up for you.

  0  
  0  
#5
Options