Code Snippet
- @echo off REM Hide output from commands
- @echo Attempting to get operating system type (32bit or 64bit)...
- REM -------------- Get 32bit or 64bit --------------
- Set RegQry=HKLM\Hardware\Description\System\CentralProcessor\0
- REG.exe Query %RegQry% > checkOS.txt
- Find /i "x86" < CheckOS.txt > StringCheck.txt
- If %ERRORLEVEL% == 0 (
- @echo This is 32 Bit Operating system!
- SET ostype = "32bit"
- ) ELSE (
- @echo This is 64 Bit Operating System!
- SET ostype = "64bit"
- )
- del /s checkOS.txt >nul 2>&1 REM Clean up silently
- del /s StringCheck.txt >nul 2>&1 REM Clean up silently
End of Code Snippet
No comments:
Post a Comment