text_combined: daren russell odbbommadaboutcablecom tim golden wrote daren russell wrote thanks found example want written vbs tried loop mentioned basically script though im even worse vbs python ive found details msdn site listing class sort understand links wmi module way get events one go basically need write text version log archive leave eventtype parameter defaults 3 guess could multiple queries sort output retrieved dates seems bit long winded way wmi works general issue pseudosql query pseudodatabase wait pseudorowset returned add clause narrow things wmi module wraps fiddly plumbing needed make connection first place makes typical queries pythonic wql query like select logfile recordnumber win32_ntlogevent logfile application becomes wmiwmi win32_ntlogevent logfileapplication queries along lines network devices active machine phyiscal partitions disks etc clearly works equifilters need things like timegenerated 20080101 youll need call query method wmi namespace passes wql along wmi subsystem directly even objects returned wrapped easier handle python get wmi stuff unqualified simply pass qualifiers prepared long wait import csv import wmi c wmiwmi writer csvwriter open logscsv wb writerwriterows loglogfile logrecordnumber logtype logeventcode logmessage logtype logtimegenerated log cwin32_ntlogevent tjg ah eureka moment thankyou explanation code much appreciated notice pseudosql query examples attempting convert understand get attributes event thanks clearing regards daren _______________________________________________ pythonwin32 mailing list kpitckaew45pythonorg httpmailpythonorgmailmanlistinfopythonwin32 wed 06 aug 2008 144904 0000 pythonwin32 reading events event logs using wmi