我们正在尝试从批处理文件启动Jboss Windows服务,但是在Jboss Windows服务从批处理文件启动后,不继续执行流程。我正在使用服务安装来启动Windows服务。虽然使用echo打印正确的路径,但仍在Jboss服务器路径中。低于错误,
错误在控制台上:
E:\Downloads\Store Operations V5.5-01 Patch 4\Store Operations V5.5-01 Patch 4\Store Operations V5.5-01 Patch 4\lib\readme.jar
1 File(s) copied
JAR FILES COPIED SUCCESSFULLY
ENTER ERROR LEVEL 0
C:\\Suite\\Store Operations V5.5
E:\Downloads\Store Operations V5.5-01 Patch 4\Store Operations V5.5-01 Patch 4\Store Operations V5.5-01 Patch 4
Service JBoss Application Server 6.1 installed
The system cannot find the drive specified.
"C:\\Suite\\Store Operations V5.5\Backup\Patch 3.0\config\properties"
C:\Suite\Store Operations V5.5\jboss\bin
The system cannot find the drive specified.
C:\Suite\Store Operations V5.5\jboss\bin
批处理文件代码段
FOR %%n in (*.jar) DO (
echo f | xcopy "%InstallerLocation%\lib\%%n" "%HOME_PATH%\lib\%%n" /Y
::echo !ERRORLEVEL!
if !ERRORLEVEL! EQU 0 (
echo JAR FILES COPIED SUCCESSFULLY
)
)
if !ERRORLEVEL! EQU 0 (
ECHO ENTER ERROR LEVEL 0
echo %HOME_PATH%
echo %InstallerLocation%
cd /d "C:\Suite\Store Operations V5.5\jboss\bin"
service install
echo "%HOME_PATH%\Backup\Patch %folderPatchNo%.0\config\properties"
cd
echo JAR BACKUP SUCCESSFUL
)
if !ERRORLEVEL! EQU 4 (
echo FAILED TO COPY THE JAR. EXITING INSTALLATION
set Result=FAILED TO COPY THE JAR. EXITING INSTALLATION
set STATUS=12
cd..
GOTO ROLLBACK
)
cd..
:: Step 7 : Copy the properties file
::Backup of existing property file in the installation folder location
if NOT EXIST "%HOME_PATH%\Backup" (
echo Folder does not exist. Creating Backup Folder
md "%HOME_PATH%\Backup\Patch %folderPatchNo%.0\config\properties"
)
cd config\properties
FOR %%n in (*.*) DO echo f | xcopy "%HOME_PATH%\config\properties\%%n" "%HOME_PATH%\Backup\Patch %folderPatchNo%.0\config\properties\%%n" /Y
if !ERRORLEVEL! EQU 0 (
echo PROPERTIES FILE BACKUP SUCCESSFUL
)
if !ERRORLEVEL! EQU 4 (
echo FAILED TO TAKE BACKUP. EXITING INSTALLATION
set Result=FAILED TO TAKE BACKUP. EXITING INSTALLATION
set STATUS=15
echo End Time : %DATE% %TIME%
cd..
cd..
GOTO END
)