简体   繁体   中英

Can windows eventtriggers be used for trivial events?

In an application I am making, I want to know when a user copies a file or clicks the start button. Those actions would be considered too trivial but they carry some importance in my application.

Yesterday, I received a comment Getting notified of any action taken by user on windows on a similar question so I am hesitating to switch the entire auditing infrastructure.

Going as per explanation of eventtriggers http://technet.microsoft.com/en-us/library/bb490901.aspx

Creates a new event trigger that monitors and acts upon the occurrence of log events of given criteria.

I am not sure what the limits of eventtriggers and how it can help me achieve my goal without so much overhead. Can eventtriggers help me set a trigger that notifies me when the start button is clicked?.

Not possible, to my knowledge, unless you poll to find out the status. This example was already brought up in a previous question on SO: How can I detect when the Windows 7 start menu opens

Theoretically you could write something that lives on a different thread that queries the start menu at given intervals. Then, if the start menu was detected as open you could trigger the code you want done. Just a thought...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM