[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[其他] 执行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>

回复 1# 呆籽儿


    请把完整代码发出来看看
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表