PC Review
Forums
Newsgroups
Windows XP
Windows XP WMI
HELP
Forums
Newsgroups
Windows XP
Windows XP WMI
HELP
![]() |
HELP |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
ok this code is a rip from the ms scripting site with some mods. My
problem is at just after invocation it list about 20+ files in in alpha order that I know (think) that have not been modified, any ideas? Also later on other files will show up that I think/know have not been modded. thanks tr strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\cimv2") Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("SELECT * FROM __InstanceModificationEvent WITHIN 10 WHERE " _ & "TargetInstance ISA 'CIM_DataFile' and " _ & "TargetInstance.extension='exe' and TargetInstance.drive='c:' and TargetInstance.Path = '\\windows\\system32\\'",,48) Do Set objLatestEvent = colMonitoredEvents.NextEvent Wscript.Echo objLatestEvent.TargetInstance.Name & " modded " & date &" "&time Loop |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

