Interesting idea but I'm getting a permissions error when I run it.
Output:
error '80041003'
/fsa/test2.asp, line 3
Line3:
Set objWMIService = GetObject("winmgmts:\\loca
My understanding of WMI is that I'll need to have an administrator account logged in to have this work. How would that work on a website admin panel where it's using an anonymous account? Can you impersonate a user account on the server? If so, this will work beautifully.
Joe
Main Topics
Browse All Topics





by: CyrexCore2kPosted on 2006-07-12 at 14:18:59ID: 17094731
Quick and dirty:
lhost\root \cimv2") elect * from Win32_Processor")
les/Hardwa reInfo.php
Dim CPU_Count
Set objWMIService = GetObject("winmgmts:\\loca
Set colItems = objWMIService.ExecQuery("S
For Each objItem In colItems
CPU_Count = CPU_Count + 1
Response.Write "CPU " & CPU_Count & ": <br><ul>"
Response.Write "Load Percentage: " & objItem.LoadPercentage & "</ul>"
Next
There's a bunch of other information you can retrieve from the objItem object. Take a look at this page:
http://www-sharp.com/artic