This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: How to install a java based windows service using "Services View"
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 04, 2016
10:24 AM
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:
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
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
(2) Replies
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Sep 09, 2016
08:14 AM
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Oct 08, 2021
06:18 AM
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 🙂