Hi there!
I need help with something.
I was wondering if there is a way to run a program before a process start ?
Let's say I am starting Chrome. I want a program to start before Chrome starts. Or when I download an executable, there is SmartScreen that runs before the executable starts to (in this situation) run an antivirus check on the executable to check if it is malware.
Is there any way to do this on Windows?
Thank you for any answer!
(And yes, this is a copy and paste of my question on stackoverflow https://stackoverflow.com/questions...)

  • 0
    Ionno how windows works but getting running programs and checking the one you wanna monitor in a loop?
  • 0
    @yellow-dog I know I could make a loop and check if there is a new thread open, but I was wondering if there was another way to do this in a more efficient way
  • 0
    Modify the shortcut to program X to run both programs launched from a powershell script?
  • 0
    @EngineerCoding no, what I meant to say is to start a program when another program that is in no way associated with mine starts. Let's say like I start visual studio or any other program, a checking program starts. Like SmartScreen on windows or any antivirus program
  • 1
    You might just modify the shortcut to open a batch script that opens your program and then opens chrome.

    Or you just code cave your program as binary into the chrome.exe file.
  • 2
    You could check the NTAPI or generally the windows API for program launch events.
  • 1
    @Ranchu thanks, I will check that out
Add Comment