Hi, I am beginner in Python. I have some questions on WMI Service in Python. I was able to use properties of Class Restore in WMI, but not able to use the method. Here is the sample code that I done, anyone can help me?
import win32com.client

strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer,"root\DEFAULT")
testobj = objSWbemServices.Get("SystemRestore")

sequence_number = 11

result = testobj.Restore(sequence_number)

Traceback (most recent call last):
File "C:\Documents and Settings\Fish\Desktop\RP_test.py", line 18, in ?
result = testobj.Restore(sequence_number)
File "c:\Python23\Lib\site-packages\win32com\client\dynamic.py", line 471, in
raise pythoncom.com_error, details
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'SWbemObjectEx',
'Invalid parameter ', None, 0, -2147217400), None)