On Windows 7, I want to execute a command-line after I close a certain process (in my case ehshell.exe). The thing is, I'd prefer not to use any external program and I'd like to prevent having to use a .cmd with taskkill in it.
I already tried using the task planer to execute my command, but I failed to set an event trigger for the task because ehshell has no event ID for closing down. I even tried to enable logging for process creation and termination in gpedit.msc but that also didn't work as expected because it really logs all processes and not just a specific one.
Did I miss something? Any ideas?
eshell.exe
through a batch file that simply startseshell.exe
and runs whatever you want afterwards? The second command will not start until you closeeshell.exe
so it should work out fine.start /w
did the trick. Then I just had to hide the command window for which I used hstart. Thanks!