1

I want to launch my application, like the windows security prompt, before any application is launched in Windows 8. Is there any event handler, which gets notified whenever any application is launched?

My use Case : I want an App similar to a child lock(Lets call it myCustomApp). When any user runs a game(say Solitare), i want myCustomApp to check the process name, and kill the process immediately.

P.S. : i am quite new to programming.

Thanks in advance!

1 Answers1

1

Is there any event handler, which gets notified whenever any application is launched?

Yes: you get use WMI events to detect new instances of Win32_Process.

But these are created with process creation, not before.

Doing something between the call to ProcessCreate that creates the new process, and the process actually being created is going to be, at best hard (you might need to do it in the kernel), but quite possibly impossible.

Why do you want to do this? What problem are you trying to solve? This really does sound like an X-Y problem.

Edit:

But you should still start out by looking for better approaches to you underlying problem.

Community
  • 1
  • 1
Richard
  • 106,783
  • 21
  • 203
  • 265
  • Thanks for the reply. My use Case : I want an App similar to a child lock(Lets call it myCustomApp). When any user runs a game(say Solitare), i want myCustomApp to check the process name, and kill the process immediately. P.S. : i am quite new to programming. – Suraj Khurana Nov 18 '13 at 06:57
  • @SurajKhurana: Group Policy already has the ability to block certain executables (by various criteria, including name) from being run. – Richard Nov 18 '13 at 13:12
  • Hi @Richard, Actually i was giving an example.I want to 'hook' my application to other applications. – Suraj Khurana Dec 04 '13 at 06:22