Skip to content
⌘ NSIS Forum Archive

How to add my application as a service

9 posts

hai12345#

How to add my application as a service

hi to all,

How to add my application as a service?

Thanks in Advance...
Anders#
A NT service is a special type of application, you can't just run any program as a service.

But if you want to force a non service app to run as a service, there was a tool that did this in one of the NT resource kits.
hai12345#
Run as service

thanks for ur reply.

i have added my application in service list of Registry, but it is not starting automaticaly.

using NSIS script, it is possible?
Afrow UK#
Adding to the services registry is not enough and you haven't answered Anders' question... Is your application an actual service executable? If it isn't then you must use Srvany.exe (from the Windows NT Resource Kit) but that is lazy if you ask me. To create and delete services you can use a plug-in such as SimpleSC.

Stu
Afrow UK#
To elaborate further, if you just want your application to start on login, you use the Software\Microsoft\Windows\CurrentVersion\Run registry under HKCU or HKLM.

Stu
hai12345#
creating service

hi,


i am creating an application in java swings, create an exe using the Xenoage software(used to convert jar 2 exe).

I used the SimpleSC.dll. I download and copied in my NSIS Plugins application path, as per the instruction given.

I created the service and it is added in the the "Services" but i can't able to start the service. I kept the service start as automatic, it is not starting. Manually also i tried but it is not starting.
hai12345#
hi

To elaborate further, if you just want your application to start on login, you use the Software\Microsoft\Windows\CurrentVersion\Run registry under HKCU or HKLM.
I already done this one. but this not my requirement. it has to start before login.
Afrow UK#
http://edn.embarcadero.com/article/32068

Edit: And for the record, if you want to show a user interface in your service, you cannot on Windows Vista and upwards. For older versions of Windows you must use the SERVICE_INTERACTIVE_PROCESS service type flag or programmatically launch your UI process under the current user with CreateProcessAsUser.

Stu