本帖最后由 pcl_test 于 2020-6-13 20:12 编辑
回复 1# 波波虎 - if /i "%PROCESSOR_IDENTIFIER:~0,3%" == "X86"
复制代码
- if exist "%SystemDrive%\Program Files (x86)\" (echo x86) else (echo x64)
复制代码
- wmic cpu get addresswidth | find /i "32" >nul &&(echo x86)||(echo x64)
复制代码
- wmic computersystem get systemtype | find /i "x86" >nul &&(echo x86)||(echo x64)
复制代码
- if not exist "%systemroot%\Syswow64\" (echo x86) else (echo x64)
复制代码
- if exist "%SystemDrive%\Program Files\Internet Explorer\iexplore.exe" if exist "%SystemDrive%\Program Files (x86)\Internet Explorer\iexplore.exe" (echo x64) else (echo x86)
复制代码
- @echo off
- setlocal enabledelayedexpansion
- for /f "tokens=1* delims=: " %%i in ('systeminfo ^| find "系统类型"') do (
- set v=%%j
- if /i "!v:~,3!" == "x86" (echo x86) else (echo x64)
- )
- pause
复制代码
|