HighTechTalks DotNet Forums  

How to query to look for the creation of a .xls file?

Dotnet Framework (WMI) microsoft.public.dotnet.framework.wmi


Discuss How to query to look for the creation of a .xls file? in the Dotnet Framework (WMI) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
tekiegreg
 
Posts: n/a

Default How to query to look for the creation of a .xls file? - 06-20-2007 , 12:21 PM






Need a sample query for example that can watch for the origination of
just a .XLS file in WMI. So far I've come up with this (note, not
entirely my work, cobbled together from websites as I'm still new to
WMI).

SELECT * FROM __InstanceCreationEvent WITHIN 10
WHERE TargetInstance ISA "CIM_DirectoryContainsFile"
AND TargetInstance.GroupComponent = "Win32_Directory.Name=\"e:\\\\Test
\""

Now within test can I trigger it to only return .xls files? Are
wildcards allowed? Thanks!


Reply With Quote
  #2  
Old   
Jonathan Liu [MSFT]
 
Posts: n/a

Default Re: How to query to look for the creation of a .xls file? - 06-21-2007 , 03:04 PM






This is what you are looking for:

http://www.microsoft.com/technet/scr...4/hey1011.mspx


--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--
"tekiegreg" <codesweeper (AT) codesweep (DOT) com> wrote

Quote:
Need a sample query for example that can watch for the origination of
just a .XLS file in WMI. So far I've come up with this (note, not
entirely my work, cobbled together from websites as I'm still new to
WMI).

SELECT * FROM __InstanceCreationEvent WITHIN 10
WHERE TargetInstance ISA "CIM_DirectoryContainsFile"
AND TargetInstance.GroupComponent = "Win32_Directory.Name=\"e:\\\\Test
\""

Now within test can I trigger it to only return .xls files? Are
wildcards allowed? Thanks!



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.