Bug 1040589

Summary: Windows Service Scripts are not correct.
Product: [JBoss] JBoss Enterprise Application Platform 5 Reporter: Eric Rich <erich>
Component: distributionAssignee: jboss-set
Status: NEW --- QA Contact: Len DiMaggio <ldimaggi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.2.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Eric Rich 2013-12-11 16:33:51 UTC
Document URL: 

https://access.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/5/html-single/Getting_Started_Guide/index.html#run_enterprise_application_platform_as_a_service_on_microsoft_windows

Section Number and Name: 
4.1. Running as a Service on Microsoft Windows

Describe the issue: 

Step 5 does not work due to a bug in the script, you should get the following error message: 

    Cannot find the run.bat.

Suggested Solution: 

Update the script with the following modifications. 

if exist "..\..\bin\run.bat" (
  set "EAPPATH=..\..\bin"

Additional information: 

Lines that cause the problem and produce the error. 

REM Find the JBOSS-AS home
if exist "..\..\jboss-as\bin\run.bat" (
  set "EAPPATH=..\..\jboss-as\bin"
) else if exist "..\bin\run.bat" (
  set "EAPPATH=..\bin"
) else if exist "run.bat" (
  set "EAPPATH=."
)

...

if not "x%EAPPATH%" == "x" goto getSvcPath
echo Cannot find the run.bat.
echo Invalid installation
goto cmdEnd