i actually never savely remove usb-sticks, so i never experienced this.
althogh the WM_DEVICECHANGE message ( aka the link provided by Zippo()) ) looks promising, there is an maybe easier workaround:
1. the script on the usb-stick, that is launched, just copies another script to a temp-dir on the harddrive and launches this. And it exits right after that.
2. the script on the temp-dir checks the existance of the usb-stick. If the stick is removed, it will exit and delete itself (via a batch-file, if necessary).