In C#, I need to look for the trigger of a process say "abc.exe"
. Whenever such a process starts, i need to fetch the first argument (always equal to the caption name,say caption_name) . Then i need to trigger another process say "xyz.exe"
with caption_name as argument to it.
I want this program to run as a background exe which runs in the system.Hence i need it to occupy less memory space. How can I do this?
This is how I started it:
ManagementEventWatcher watcher = new ManagementEventWatcher("Select * From __InstanceCreationEvent Within 5 Where TargetInstance Isa \"Win32_Process\" And TargetInstance.Name = \"hilite.exe\"");
watcher.EventArrived += watcher_EventArrived;