[Windows]

Using the WASServiceHelper utility to create Windows services for application servers

You can use wasservicehelper.bat as a front end for WASService.exe to add, update, or remove WebSphere® Application Server services on a Windows operating system.

Before you begin

WASService.exe and wasservicehelper.bat must be in their default directory in order to add, update, or remove WebSphere Application Server services on a Windows operating system using the WASServiceHelper utility:
app_server_root\bin

About this task

Using the WASService command to add or remove a WebSphere Application Server service on a Windows operating system can be confusing and error prone. The WASServiceHelper utility greatly reduces the time it takes to add, update, or remove a Windows service for WebSphere Application Server and reduces the opportunity for errors. Prior to WebSphere Application Server Version 8.0, the WASServiceHelper utility was available as a free service download called WASServiceCmd.

Supported management functions of the WASServiceHelper utility include the ability to:
  • Add a new or update an existing Windows service using the minimum required parameters
  • Add a new or update an existing Windows service using all available parameters
  • Remove a service
  • Display the status of a service
  • Enable WASService traces for problem determination
Note: Hints and warnings display as you go to help you prevent common problems.
The following procedure is an example of using the WASServiceHelper utility to create a service using the minimum number of parameters.

Procedure

  1. Change to the following directory:
    app_server_root\bin
  2. Launch the WASServiceHelper utility.
    wasservicehelper.bat
  3. In response to Select number next to the options on the main menu, select 1 to create a service using the minimum number of parameters.
  4. In response to Select number next to the profile, select the number associated with the profile for which you want to create the service.
  5. In response to Select number next to server, select the number associated with the server.
  6. Enter the service name for your service.
  7. In the next steps, accept the default values by pressing Enter or make changes as needed.
    1. Enter any additional start arguments.
      -startArgs and -stopArgs are not required options. Use these options to specify additional parameters used for starting and stopping the JVM process. For example, you can add a user name and password:
      -stopArgs "-username myname -password passw0rd"
      
      These additional parameters are automatically passed into the script that the Windows service uses to stop the JVM process.

      The default is to provide no additional arguments, and you can press Enter to skip this option.

    2. Enter the log root path.

      You can press Enter to accept the default location, or you can enter the full path to your log root directory.

    3. Enter the log file name.

      You can press Enter to accept the default location, or you can enter the full path to your log file directory.

    4. Enter the configuration root location.

      You can press Enter to accept the default location, or you can enter the full path to your configuration root directory.

    5. Specify the restart policy.

      Enter 1 to automatically restart this service if it fails. Enter 2 to restart manually if the service fails.

      If you press Enter, the default value of 1 is assumed.

    6. Specify the start type.

      Enter 1 if you want this service to automatically start when the operating system starts or when the service is called for the first time. Enter 2 if the service must be started manually using the Windows Services panel.

      If you press Enter, the default value of 1 is assumed.

  8. Review all the parameters in the panel displaying the final command, and then respond to Execute command now? with a Y (yes) or N (no).

    If you enter Y, the WASServiceHelper utility runs the WASService command and calls all of the selected parameters.

    Note: This also creates an entry in a WASServiceHelper.log file in the current directory that contains the actual WASService command used to add, update, or remove the service. For example:
    WASService.exe -add "Deployment Mgr01" -serverName "dmgr"
    -profilePath "C:\Program Files\IBM\WebSphere\AppServer\profiles\Dmgr01"
    -logRoot "C:\Program Files\IBM\WebSphere\AppServer\profiles\Dmgr01\logs\dmgr"
    -logFile "C:\Program Files\IBM\WebSphere\AppServer\profiles\Dmgr01\logs\dmgr\WS_startdmgr.log" 
    -encodeParams -stopArgs "-username vanno -password ****** "
    -startType manual
    -restart false