How to check the Operation System version
if OS is 32 bit or 64 bit
Quick batch file to check OS version…
@echo off
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"
) ELSE (
Echo "This is 64 Bit Operating System"
)
pause
a little more you might like:
ReplyDelete@echo off
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"
) ELSE (
Echo "This is 64 Bit Operating System"
)
pause
del StringCheck.txt
del checkOS.txt
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
Set K_="HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
Set "P_=Service Pack 3"
Reg query %K_% /v CSDversion|Find "%P_%">Nul 2>&1&&(
Echo:%P_% Already Installed. Please reboot now && ping -n 60 127.0.0.1>nul)||(
Echo:Installing %P_%&WindowsXP-KB936929-SP3-x86-ENU.exe /quiet)