Source language: Translate to:

Get Temperature

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Get Temperature

Postby Alex » Tue Aug 30, 2011 11:35 am

Hi,

I have this VBS function:

Code: Select all
{NeoBook Function}
Version=5,70
Language=VBScript
Param=[%1]|Variable|Get Now Temp
{End}
' Get info about temp

Dim txt, ram, ramMBGB, videoramMBGB, videoram


Set objWMIService = GetObject("winmgmts:\\.\root\WMI")
Set colItems = objWMIService.ExecQuery("SELECT * FROM MSStorageDriver_ATAPISmartData",,48)
For Each objItem in colItems
For i = 0 To 361
If objItem.VendorSpecific(i) = 194 Then
txt=txt  & objItem.VendorSpecific(i + 5)
Exit For
End If
Next
Next

publication.nbSetVar "[%1]", txt



It is to get the HDD Temperature, but it doesn't work when UAC is activated or when I am not admin. Is there an other way?

Thanks

Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Tony Kroos » Tue Aug 30, 2011 10:45 pm

there are a lot of threads on microsoft technet and socials regarding wmi security issues (google wmi 80041003 error), still no acceptable solutions, so you'd better just turn off uac
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Alex » Tue Aug 30, 2011 10:53 pm

Hi,

Yes thanks, but is there not an other solution? Or an other way to get the temperature?

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby Tony Kroos » Wed Aug 31, 2011 12:24 am

well, maybe someone would create a plugin for retrieving hdd s.m.a.r.t. info (no wmi calls if possible)
for ex. codeproject.com/KB/winsdk/Hard_drive_Information.aspx
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Postby Alex » Wed Aug 31, 2011 2:26 am

Hi,

Yes, this will be great.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron