Run newt.exe as Windows Service #14

Closed
opened 2025-11-19 07:11:52 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @LukasSt46 on GitHub (Apr 3, 2025).

Hi, is it possible, to run newt.exe including all parameters, as a Windows Service?

Originally created by @LukasSt46 on GitHub (Apr 3, 2025). Hi, is it possible, to run newt.exe including all parameters, as a Windows Service?
Author
Owner

@oschwartz10612 commented on GitHub (Apr 3, 2025):

You should be able to but you'll have to create it manually! Take a look at the following link: https://stackoverflow.com/questions/3582108/create-windows-service-from-executable

@oschwartz10612 commented on GitHub (Apr 3, 2025): You should be able to but you'll have to create it manually! Take a look at the following link: https://stackoverflow.com/questions/3582108/create-windows-service-from-executable
Author
Owner

@LukasSt46 commented on GitHub (Apr 3, 2025):

Yes, I tried that. Unfortunately, the service doesn't start. It stays in the "Starting" state and then terminates after 60 seconds. The service would work during those 60 seconds. It seems as if the EXE file isn't transmitting the "started" status to Windows.

@LukasSt46 commented on GitHub (Apr 3, 2025): Yes, I tried that. Unfortunately, the service doesn't start. It stays in the "Starting" state and then terminates after 60 seconds. The service would work during those 60 seconds. It seems as if the EXE file isn't transmitting the "started" status to Windows.
Author
Owner

@oschwartz10612 commented on GitHub (Apr 4, 2025):

Instead of manually creating the service, have you considered using a tool like nssm (Non-Sucking Service Manager)? It simplifies creating Windows services from executables. It might handle the 'started' status issue automatically. You can find it here: https://nssm.cc/

If you still encounter problems with nssm, please provide the command you used and any error messages. Unfortunately I am not a Windows expert and have not created services before but if we figure this out we could add it to the docs.

@oschwartz10612 commented on GitHub (Apr 4, 2025): Instead of manually creating the service, have you considered using a tool like nssm (Non-Sucking Service Manager)? It simplifies creating Windows services from executables. It might handle the 'started' status issue automatically. You can find it here: https://nssm.cc/ If you still encounter problems with nssm, please provide the command you used and any error messages. Unfortunately I am not a Windows expert and have not created services before but if we figure this out we could add it to the docs.
Author
Owner

@oschwartz10612 commented on GitHub (Apr 22, 2025):

Please reopen if you need further help!

@oschwartz10612 commented on GitHub (Apr 22, 2025): Please reopen if you need further help!
Author
Owner

@paivaric commented on GitHub (Sep 1, 2025):

Hi guys... I tried all those solution but have no success... anyone have succeed?

@paivaric commented on GitHub (Sep 1, 2025): Hi guys... I tried all those solution but have no success... anyone have succeed?
Author
Owner

@oschwartz10612 commented on GitHub (Sep 1, 2025):

Newt stored and loads credentials from %PROGRAMDATA%\newt\newt-client\config.json according to the readme. Maybe you can make sure it is populated (you can run newt in the cli with the --id and --secret) and it will save this file. Then run it as a service with nssm and let me know what happens?

Are you able to get the logs to see what it is doing when it is a service?

@oschwartz10612 commented on GitHub (Sep 1, 2025): Newt stored and loads credentials from `%PROGRAMDATA%\newt\newt-client\config.json` according to the readme. Maybe you can make sure it is populated (you can run newt in the cli with the --id and --secret) and it will save this file. Then run it as a service with nssm and let me know what happens? Are you able to get the logs to see what it is doing when it is a service?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/newt#14