Re: WMI Help

2006-07-13 Thread 3c273
"Tim Golden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 3c273 wrote: > > Hello, > > When I run the following at an interactive interpreter on Windows XP, I get > > the expected results. But if I save it to a file and run it, it generates > > the following error. (And it generates

Re: WMI Help

2006-07-13 Thread Tim Golden
3c273 wrote: > Hello, > When I run the following at an interactive interpreter on Windows XP, I get > the expected results. But if I save it to a file and run it, it generates > the following error. (And it generates the same error either way on Windows > 2000) > > import wmi > c=wmi.WMI() > for i

Re: WMI Help

2006-07-13 Thread 3c273
"Michel Claveau" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Re! > > This script run on my XP : > > > import win32com.client > WMIS = win32com.client.GetObject(r"winmgmts:root\cimv2") > objs = WMIS.ExecQuery("select * from Win32_PhysicalMedia") > for obj in objs: > print obj.S

Re: WMI Help

2006-07-13 Thread Michel Claveau
Re! This script run on my XP : import win32com.client WMIS = win32com.client.GetObject(r"winmgmts:root\cimv2") objs = WMIS.ExecQuery("select * from Win32_PhysicalMedia") for obj in objs: print obj.SerialNumber print obj.Tag print -- @-salutations Michel Claveau -- http://mail.p

Re: WMI Help

2006-07-13 Thread Michel Claveau
Hi! Win32_PhysicalMedia WMI class is available only on Windows 2003 or XP Then, swap Admin <=> Normal_user -- @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

WMI Help

2006-07-13 Thread 3c273
Hello, When I run the following at an interactive interpreter on Windows XP, I get the expected results. But if I save it to a file and run it, it generates the following error. (And it generates the same error either way on Windows 2000) import wmi c=wmi.WMI() for item in c.win32_PhysicalMedia():