Code
Function GetTemp() As String
Try
Dim searcher As New ManagementObjectSearcher("root\WMI", "SELECT * FROM MSAcpi_ThermalZoneTemperature")
For Each queryObj As ManagementObject In searcher.Get()
Dim temp As Double = CDbl(queryObj("CurrentTemperature"))
temp = (temp - 2732) / 10.0
return temp.tostring()
Next
Catch ex As ManagementException
MessageBox.Show(ex.Message)
return nothing
End Try
End Function