I am trying to control my device manager programmatic through python (ie disable and re-enabling devices). However I am having trouble figuring out what are the attributes in the namespace of the "win32com.client.Dispatch("Shell.Application")". All i know how to do is get the name and print it. I did a debugging run through the code but i couldn't find anything useful.
Here is what I have so far
import win32com.client
shell = win32com.client.Dispatch("Shell.Application")
control_panel = shell.Namespace(3)
for item in control_panel.Items():
if item.Name == "Device Manager":
print item
break
this wasn't very useful either:
control_panel.GetNamespace("MAPI")
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 516, in __getattr__
raise AttributeError("%s.%s" % (self._username_, attr))
AttributeError: <unknown>.GetNamespace