When starting an application, perform Windows task

Asked

Viewed 108 times

1

I am looking for a way to perform a windows task whenever an application starts. I need to run a VBS or BAT whenever an app starts (it starts with a second app after the user has entered their login and password in it)...

Does anyone know if this is possible? Can I create a Rigger or something? a service that keeps reading the windows log and if "X" application starts it does something?

  • Don’t you know where to put it? Or how to call/run the application? Do you know which is the script what needs to be called? You created this application that needs to call the script?

2 answers

1


Let’s assume you want to run the y.exe whenever the x.exe is executed. What you can do is:

  1. Rename the x.exe for z.exe.
  2. Create a new program x.exe to execute both, the z.exe and the y.exe, passing on to z.exe the same command line parameters received (or if interesting, some different parameters).

1

You can create a service that monitors the list of active processes and detects the presence of the application in question.

If you are going to use . NET, the list of processes can be accessed with System.Diagnostics.Process.GetProcesses().

Browser other questions tagged

You are not signed in. Login or sign up in order to post.