What's Here?
- Members: 300,309
- Replies: 825,515
- Topics: 137,361
- Snippets: 4,417
- Tutorials: 1,147
- Total Online: 2,088
- Members: 129
- Guests: 1,959
|
This is a snippet that can be used to retrieve the CPU ID in VBScript
|
Submitted By: PsychoCoder
|
|
Rating:
 
|
|
Views: 5,116 |
Language: ASP
|
|
Last Modified: February 10, 2008 |
|
Instructions: Add the function to your vbs file, then call it |
Snippet
Function GetCpuID()
'create our variables
Dim wmi, cpu
'use GetObject to get the WMI instance
Set wmi = GetObject("winmgmts:")
'loop through all CPU's found
For Each cpu in wmi.InstancesOf("Win32_Processor")
'write out the processor ID
wscript.echo "CPU: " & cpu.ProcessorID
Next
End Function
Copy & Paste
|
|
|
|