import System
import clr
clr.AddReference("System.Management")
import System.Management
def requestWMI(squery,sproperties):
output = ""
objMgt = System.Management.ManagementObjectSearcher(squery)
for result in objMgt.Get():
output += result.GetPropertyValue(sproperties)
return output
print requestWMI("Select * from Win32_BIOS", "Caption")
raw_input()
Powered by ScribeFire.
No comments:
Post a Comment