Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently looking for a program or source in C / C++ that will allow me to monitor any new executable files and output the results to a text file

Any help would be greatly appreciated


migration rejected from Nov 9 '15 at 3:41

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by ceejayoz, womble Nov 9 '15 at 3:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

I think you'll get better results on – Erik van Brakel May 19 '11 at 20:39
possible duplicate of Detecting child processes – Hans Passant May 19 '11 at 20:59
+1 on Erik van Brakel's comment, as there are probably tools out there that already do this. Also, is there any reason you only want to look at .exe files? Depending on your needs, you find it easier to catalog md5 / SHA hashes of all files on a periodic basis for monitoring purposes. A lot of homebrew malware detection solutions use this method. – meklarian May 19 '11 at 21:03
I don't know why a programming question was moved to SF but I'll give you a clue: FindFirstChangeNotification() and FindNextChangeNotification(). Check the documentation for the details. – John Gardeniers May 20 '11 at 3:18

The solutions here: could most likely be easily modified to serve your purpose.