how to launch a *.vbs every time my application like notepad, esclipe starts. so that i dont have to every time i start my esclipse , go and click on vbs manually Also i dont want to put them in start up , coz i have to run the script every time my either notepad starts.
Will WMI events polling be of any help?custom event or Alternative data stream!! the issue with alternative data stream is it will launch one application at a time either my vbs or my notepad. i want both+ or Can registry be of a any help?
*OS: Window 7 32 and 64 bit both
You can create an event listener and launch your vbs file when notepad starts:
Register-WmiEvent -Class Win32_ProcessStartTrace -SourceIdentifier ProcessStart -Action {
$proc = $event.SourceEventArgs.NewEvent
if($proc.ProcessName -eq 'notepad.exe')
{
wscript "C:\test.vbs"
}
}