从我的DVD运行批处理文件



我制作了一个批处理文件,用来查看您运行的是64位还是32位系统。它在我的电脑上很好用,但当我把它放在DVD上运行时,它就不起作用了。如何让它从DVD中正确运行?感谢

@echo off
IF EXIST "%programfiles(x86)%" (GOTO 64-Bit) ELSE (GOTO 32-Bit)
:32-Bit
ECHO.   32-Bit Operating System Detected
GOTO END
:64-Bit
ECHO.   64-Bit Operating System Detected
GOTO END
:END
echo Press any key to exit...
pause >nul

第二次尝试>>>>>这样行吗?

@echo.off
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%a:programfiles(x86) set SysType=%%a:
IF EXIST "%systemroot%programfiles(x86)" %SysType% (GOTO 64-Bit) ELSE (GOTO 32-Bit)
:32-Bit
ECHO. 32-Bit O/S detected
GOTO END
:64-Bit
ECHO. 64-Bit O/S detected
GOTO END
:END
echo.
echo.
echo.
echo Press any key to exit...
pause >nul
@echo off
IF EXIST "C:WINDOWSsystem32DRVSTOREGEARAspiWD_1E13C24EB2F28CB6915317F7F17F180ECAA0DB1Ex86" goto :64-Bit
if not exist "C:WINDOWSsystem32DRVSTOREGEARAspiWD_1E13C24EB2F28CB6915317F7F17F180ECAA0DB1Ex86" goto :32-Bit
color c
cls
echo.
echo.
echo                                  UNSPECIFIED OPERATING SYSTEM TYPE.
echo -----------------------------------------------------------------------------------------------------------------------------
echo.
echo.
echo.
pause >nul
exit
:32-Bit
ECHO.   32-Bit Operating System Detected
echo.
echo.
pause >nul
goto :END
:64-Bit
ECHO.   64-Bit Operating System Detected.
echo.
echo.
echo.
pause >nul
goto :END
:END
exit

经过测试,对我来说效果很好,希望对你也一样!

相关内容

  • 没有找到相关文章

最新更新