Manage Windows services using sc.exe from an elevated command prompt.
Note: Run these commands as Administrator.
sc.exe create CheckPointAutoConnect ^
binPath= "C:\Dev\net6\ASPNETCoreWindowsService\bin\Debug\net6.0\win-x64\publish\ASPNETCoreWindowsService.exe" ^
DisplayName= "CheckPointAutoConnect" ^
start= auto
sc.exe delete CheckPointAutoConnect
Tip: Stop the service before deleting it:
sc.exe stop CheckPointAutoConnect