windows - Batch-file get CPU temperature in °C and set as variable -


how batch-file work out temperature of cpu , return variable. know can done have seen been done. solution can use external tool. have looked on google @ least 2 hours found nothing. can 1 help. thanks.

here example keeps decimal values , uses full conversion value.

code

@echo off /f "skip=1 tokens=2 delims==" %%a in ('wmic /namespace:\\root\wmi path msacpi_thermalzonetemperature currenttemperature /value') set /a "hundegcel=(%%~a*10)-27315" echo %hundegcel:~0,-2%.%hundegcel:~-2% degrees celsius 

output

38.05 degrees celsius 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -