Board logo

标题: [其他] 执行bat脚本之后CMD窗口闪退,执行test.bat后报如下错误 [打印本页]

作者: 呆籽儿    时间: 2022-3-17 09:33     标题: 执行bat脚本之后CMD窗口闪退,执行test.bat后报如下错误

Microsoft Windows [版本 10.0.19043.1586]
(c) Microsoft Corporation。保留所有权利。

C:\Users\半杯柠檬汁>Y:\ncchome2111\ncchome2111\bin\test.bat

C:\Users\半杯柠檬汁>SET JAVA_HOME="Y:\ncchome2111\ncchome2111\ufjdk"

C:\Users\半杯柠檬汁>if "Windows_NT" == "Windows_NT" setlocal

C:\Users\半杯柠檬汁>set BIN_HOME=Y:\ncchome2111\ncchome2111\bin\

C:\Users\半杯柠檬汁>if exist Y:\ncchome2111\ncchome2111\bin\\..\.newInstall (del /F/Q Y:\ncchome2111\ncchome2111\bin\\..\.newInstall  1>nul )

C:\Users\半杯柠檬汁>if exist Y:\ncchome2111\ncchome2111\bin\\..\.needDeployEjb (del /F/Q Y:\ncchome2111\ncchome2111\bin\\..\.needDeployEjb  1>nul )

C:\Users\半杯柠檬汁>rem set BIN_HOMES=Y:\ncchome2111\ncchome2111\bin\

C:\Users\半杯柠檬汁>rem if not  Y:\ncchome2111\ncchome2111\bin\ ==  (

C:\Users\半杯柠檬汁>rem         echo NC_HOME is't support long filename.

C:\Users\半杯柠檬汁>rem         goto QUIT

C:\Users\半杯柠檬汁>rem

C:\Users\半杯柠檬汁>if not "" == "" (
call Y:\ncchome2111\ncchome2111\bin\\uapSetupCmdLine.bat
call Y:\ncchome2111\ncchome2111\bin\\wasSetupCmdLine.bat
call Y:\ncchome2111\ncchome2111\bin\\wlsSetupCmdLine.bat
goto START
)

C:\Users\半杯柠檬汁>call Y:\ncchome2111\ncchome2111\bin\\uapSetupCmdLine.bat

C:\Users\半杯柠檬汁>set CUR_DIR=Y:\ncchome2111\ncchome2111\bin\

C:\Users\半杯柠檬汁>cd /d "Y:\ncchome2111\ncchome2111\bin\.."

Y:\ncchome2111\ncchome2111>set NC_HOME=Y:\ncchome2111\ncchome2111

Y:\ncchome2111\ncchome2111>set ANT_HOME=Y:\ncchome2111\ncchome2111\ant

Y:\ncchome2111\ncchome2111>set NC_JAVA_HOME=Y:\ncchome2111\ncchome2111\ufjdk

Y:\ncchome2111\ncchome2111>set BIN_HOME=Y:\ncchome2111\ncchome2111\bin

Y:\ncchome2111\ncchome2111>set TOMCAT_HOME=Y:\ncchome2111\ncchome2111

Y:\ncchome2111\ncchome2111>set ANT_OPTS=-Xmx512m -XX:MaxPermSize=512m

Y:\ncchome2111\ncchome2111>set NC_LOGIN_JAR_CONF=Y:\ncchome2111\ncchome2111\ierp\bin\jarversion.ini

Y:\ncchome2111\ncchome2111>set NC_LOGIN_JAR_PATH=Y:\ncchome2111\ncchome2111\webapps\nc_web\Client\appletjar

Y:\ncchome2111\ncchome2111>for /F "tokens=1 delims=/=" %i in (Y:\ncchome2111\ncchome2111\ierp\bin\jarversion.ini) do set NC_LOGIN_JAR_VERSION=%i

Y:\ncchome2111\ncchome2111>set NC_LOGIN_JAR_VERSION=UAP_Login_v6.jar

Y:\ncchome2111\ncchome2111>set NC_LOGIN_JAR="Y:\ncchome2111\ncchome2111\webapps\nc_web\Client\appletjar\UAP_Login_v6.jar"

Y:\ncchome2111\ncchome2111>REM LOGLEVEL is DEBUG, ERROR

Y:\ncchome2111\ncchome2111>set LOGLEVEL=ERROR

Y:\ncchome2111\ncchome2111>REM Setting short filename.

Y:\ncchome2111\ncchome2111>REM FOR %i IN ("Y:\ncchome2111\ncchome2111") DO SET NC_HOME=%~fsi

Y:\ncchome2111\ncchome2111>REM FOR %i IN ("Y:\ncchome2111\ncchome2111\ant") DO SET ANT_HOME=%~fsi

Y:\ncchome2111\ncchome2111>REM FOR %i IN (""Y:\ncchome2111\ncchome2111\ufjdk"") DO SET JAVA_HOME=%~fsi

Y:\ncchome2111\ncchome2111>REM FOR %i IN ("Y:\ncchome2111\ncchome2111\bin") DO SET BIN_HOME=%~fsi

Y:\ncchome2111\ncchome2111>if not "" == "" (
set JAVA_HOME=
goto CheckENV
)

Y:\ncchome2111\ncchome2111>if ""Y:\ncchome2111\ncchome2111\ufjdk"" == "" (
set JAVA_HOME=Y:\ncchome2111\ncchome2111\ufjdk
goto CheckENV
)

Y:\ncchome2111\ncchome2111>if "Y:\ncchome2111\ncchome2111" == "" (
echo NC_HOME environment variable is invalid.
goto QUIT
)

Y:\ncchome2111\ncchome2111>if ""Y:\ncchome2111\ncchome2111\ufjdk"" == "" (
echo JAVA_HOME environment variable is undefined, please set it.
goto QUIT
)

Y:\ncchome2111\ncchome2111>if not exist ""Y:\ncchome2111\ncchome2111\ufjdk"\bin\java.exe" (
echo Current JAVA_HOME environment variable is "Y:\ncchome2111\ncchome2111\ufjdk".
echo JAVA_HOME environment variable is invalid.
goto QUIT
)

Y:\ncchome2111\ncchome2111>for /F "tokens=3" %A IN ('cmd /c ""Y:\ncchome2111\ncchome2111\ufjdk"\bin\java" -version 2>&1 | findstr "java version"') do (for /F "tokens=1,2 delims=." %B in ("%~A") do (SET JavaVer=%C ) )
命令语法不正确。

Y:\ncchome2111\ncchome2111>if 7 gtr  (

Y:\ncchome2111\ncchome2111>
作者: Batcher    时间: 2022-3-17 09:56

回复 1# 呆籽儿


    请把完整代码发出来看看




欢迎光临 批处理之家 (http://bbs.bathome.net/) Powered by Discuz! 7.2