Run app as service of Windows - Forum

Forum Navigation
You need to log in to create posts and topics.

Run app as service of Windows

Hi. I am trying to create a small application that will send some data to a server through a call even php. I want to create a service for Windows that keeps running and every X time send the data.

I have made the application and it works perfectly, there is no need to iterate with it, since the timer runs when the application starts.

I am using nssm and sc, to create the services. With sc I have not been able. With nssm I have been able to create and run it, but it doesn't work. I have checked the task manager and the .exe is running, but in the memory column it occupies 6mb, while if I run the .exe normally, the process is 8mb.

Can anybody help me?

Thank you.

nadie?

@joxm

nadie?

I have no experience with running programs as a windows service, nor with nssm and sc.

With nssm I have been able to create and run it, but it doesn't work.

Perhaps you can elaborate on the phrase "it doesn't work" ... are you saying that it is not sending data to your server ? ... or do you have other indicators that the Timer event is not being serviced ?

You might consider diagnosing the issue in baby steps ...

a) Just run a simple VisualNEOWin compiled program as a service ... i.e. every time the Timer pops, FileWrite a line of text that includes a Time Stamp ... that way, you can establish if programs compiled with VisualNEOWin can indeed be run as a Windows service.

b) if you can, then add your command(s) to send data to your server to the FileWrite command ... see if it continues logging the events or just stops.

c) if it does not, post your Timer event code here.

BTW, can I enquire if you have succeeded in deploying nssm to run other programs (i.e. built with other compilers) as a windows service.

 

Are You using some plugin in the app?