@echo off
for /f "tokens=2,*" %%i in ('systeminfo^|findstr "系统类型"') do (
set ty=%%i
call :ife
)
goto :ex
:ife
if "%ty:~,3%"=="X86" (
regsvr32 PSDico32.dll
del PSDico64.dll
) else (
regsvr32 PSDico64.dll
del PSDico32.dll
)
goto :eof
:ex
exit
尝试了这个方法,用32位自解压也可以正确判断,但是判断过程很慢哦,要读取很多系统信息