farzad_itm
Pilgrim

How to install a java based windows service using "Services View"

Hi

I have to install a java based windows service at the end of the installation. Currently I use a custom action to run a batch file to create the service. To create the service I use Apache Commons Daemon, prunsrv.exe, and as you may know I have to send command-line arguments to it. Actually the command which I put inside the batch file to create the service looks like the following:

myService.exe //IS//MyService --Install=C:\MyService\bin\myService.exe --Description="My Java Service" --Jvm=auto --Classpath=C:\MyService\classes --StartMode=jvm --StartClass=com.platinumsolutions.MyService --StartMethod=windowsService --StartParams=start --StopMode=jvm --StopClass=com.platinumsolutions.MyService --StopMethod=windowsService --StopParams=stop --LogPath=C:\MyService\logs --StdOutput=auto --StdError=auto



I want to create the service using Services View instead of custom action to be able to use capabilities of Services View to start and stop the service and show the error message if the service couldn’t be started. How could I do this? I know that I have to create a component containing the myService.exe as the key file and create a service for this component but I don’t know how could I pass the command-line arguments to the executable file.

Regards,
Ferez
Labels (1)
0 Kudos
2 Replies
Not applicable

farzad_itm wrote:
...but I don’t know how could I pass the command-line arguments to the executable file.


In the IS GUI use the "Enable Service Install" option and add your command line arguments to the "Start Parameters" field.
0 Kudos
dbielke_1986
Flexera beginner

Hey Farzad,

 

do you have any updates on these? I am trying the same thing and seem to be having the same problems as you...

 

Any help is highly recommended 🙂

0 Kudos