System Info

System Help

Is there a way to get system information using a script instead of using the dx plugin. Ive looked around and didnt find anything about it. I was just wondering if this was possible. I would like more than one system stats in one object to display. Like in Vad M's system navagator. Thank You
5,708 views 21 replies
Reply #1 Top
Not sure exactly what you're going for but you can always use WMI to get the system info you're looking for.
Reply #2 Top
What is WMI ? Im trying to have a bunch of stats scroll in a certin area like Vad M's system navagator.
Reply #3 Top
What is WMI

W indows
M anagement
I nstrumentation

wmimgmt.msc
Reply #5 Top
A good tool to browse through your WMI is wbemtest.exe (c:\windows\system32\wbem\wbemtest.exe, I think it's only in xp pro). There are some good tutorials on the net but Microsoft has some too: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/wbemtest_93qs.mspx

Don't forget to read up on Script-o-Matic
Reply #6 Top
what is Script-o-Matic and where can i get it. Thank you
Reply #7 Top
i found Script-o-Matic but how do you use it.
Reply #8 Top
how do you use it


Did you check the readme?

It's really quite informative and the utility as a whole looks really useful!


Posted via WinCustomize Browser/Stardock Central
Reply #9 Top
i did look through the read me but how do i get it to work in desktop x.
Reply #10 Top
what system info are you looking to pull from wmi?
Reply #11 Top
like video card stats, cpu stats, that kind of things. i have script o matic. But i dont know how to get the cpu and video card stats. even if i did find them how do i put them in desktop x. do i copy and paste?? Thanks You
Reply #12 Top
jlaj1989: check out Brad's tutorial on creating a widget. It uses WMI to poll disk space usage. Find it here: https://www.wincustomize.com/Articles.aspx?AID=67611

Read that, and then look at the code Script-o-Matic creates. Study the differences between the two and you should be able to do whatever you want with WMI
Reply #13 Top
Thanks for the tutorial. ill have to study it a bit. Thank you
Reply #14 Top
That helped a little but i still dont know how to display my video card stats.
Reply #15 Top
Never mind i found it but i now have to figure out how to put it in a script.
Reply #16 Top
I figured it out if you want it.

Dim objWMIService
Dim szDrive

Sub Object_OnScriptEnter
object.settimer 123, 5000
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Object_OnTimer123
End Sub

Sub Object_OnScriptExit
Set objWMIService = nothing
End Sub

Sub Object_OnTimer123
Dim colItems
Set colItems = objWMIService.ExecQuery("Select VideoProcessor from Win32_VideoController",,48)
For Each objItem In colItems
Object.text = objItem.VideoProcessor
Exit Sub
Next
End Sub
Reply #17 Top
ok maybe i didnt figure all of it out. How do i have 2 objItems in the text.
Reply #18 Top
How about (in the above) using
Object.Text = "Resolution: " & objItem.CurrentHorizontalResolution & " x " & objItem.CurrentVerticalResolution

Just an example of combining strings
Reply #19 Top

For Each objItem In colItems
Object.text = Object.text & objItem.VideoProcessor
Exit Sub
Reply #20 Top
I understand how to do this. Thank you though. But how do i put the bolded parts:
Object.Text = "Resolution: " & objItem.CurrentHorizontalResolution & " x " & objItem.CurrentVerticalResolution

Into this line
Set colItems = objWMIService.ExecQuery("Select VideoProcessor from Win32_VideoController",,48)

Thank You
Reply #21 Top
I spent all night one night to try and figure it out. And i just decide to play around again and it takes me 2 minutes to figure it out. All you do is change the bolded part.
Dim objWMIService
Dim szDrive

Sub Object_OnScriptEnter
object.settimer 123, 2500
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Object_OnTimer123
End Sub

Sub Object_OnScriptExit
Set objWMIService = nothing
End Sub

Sub Object_OnTimer123
Dim colItems
Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController",,48)
For Each objItem In colItems
Object.text = objItem.VideoProcessor & " (" & objItem.AdapterRAM / 1048576 & "MB)"
Exit Sub
Next
End Sub