cmd.exe只能执行部分指令了--dir,cd可执行findstr,shutdown却无法执行,为此重装系统,损失惨重!
我装了一个jboss服务器,运行run.bat之前shutdown findstr都可以执行,可一运行run.bat文件后就提示
'findstr' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
shutdown也是这样,为这重新装了一遍系统呢...病毒基本排除,我的瑞星都是最新的也没杀到木马,痛苦啊,请教高手了
这个run.bat文件如下
@echo off
rem -------------------------------------
rem JBoss Bootstrap Script for Win32
rem -------------------------------------
rem $Id: run.bat 6883 2006-10-18 07:10:42Z mladen.turk@jboss.com $
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal
set DIRNAME=.\
if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
set PROGNAME=run.bat
if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
if ""%JSERVICE_NAME%"" == """" set JSERVICE_NAME=UNDEFINED
set PATH=%DIRNAME%\native;%PATH%
REM Read all command line arguments
REM
REM The %ARGS% env variable commented out in favor of using %* to include
REM all args in java command line. See bug #840239. [jpl]
REM
REM set ARGS=
REM :loop
REM if [%1] == [] goto endloop
REM set ARGS=%ARGS% %1
REM shift
REM goto loop
REM :endloop
REM Find run.jar, or we can't continue
set RUNJAR=%DIRNAME%\run.jar
set RUNMAIN=org.jboss.Main
if exist "%RUNJAR%" goto FOUND_RUN_JAR
echo Could not locate %RUNJAR%. Please check that you are in the
echo bin directory when running this script.
goto END
:FOUND_RUN_JAR
set RUNSVC=%DIRNAME%\jbosssch.jar
if exist "%RUNSVC%" set RUNJAR=%RUNJAR%;%RUNSVC%
if exist "%RUNSVC%" set RUNMAIN=org.jboss.windows.Service
if not "%JAVA_HOME%" == "" goto ADD_TOOLS
set JAVA=java
echo JAVA_HOME is not set. Unexpected results may occur.
echo Set JAVA_HOME to the directory of your local JDK to avoid this message.
goto SKIP_TOOLS
:ADD_TOOLS
set JAVA=%JAVA_HOME%\bin\java
if exist "%JAVA_HOME%\lib\tools.jar" goto SKIP_TOOLS
echo Could not locate %JAVA_HOME%\lib\tools.jar. Unexpected results may occur.
echo Make sure that JAVA_HOME points to a JDK and not a JRE.
:SKIP_TOOLS
rem Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
rem compatible distribution to which JAVA_HOME points
set JAVAC_JAR=%JAVA_HOME%\lib\tools.jar
rem If JBOSS_CLASSPATH is empty, don't include it, as this will
rem result in including the local directory, which makes error tracking
rem harder.
if "%JBOSS_CLASSPATH%" == "" (
set JBOSS_CLASSPATH=%JAVAC_JAR%;%RUNJAR%
) ELSE (
set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVAC_JAR%;%RUNJAR%
)
rem Setup JBoss specific properties
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME%
set JBOSS_HOME=%DIRNAME%\..
rem Add -server to the JVM options, if supported
"%JAVA%" -version 2>&1 | findstr /I hotspot > nul
if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
rem JVM memory allocation pool parameters. Modify as appropriate.
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m
rem With Sun JVMs reduce the RMI GCs to once per hour
set JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
rem JPDA options. Uncomment and modify as appropriate to enable remote debugging.
rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS%
rem Setup the java endorsed dirs
set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
echo ============================================