lol you fail at searching.
The workaround to turn off Windows Vista CD or DVD drive auto eject function is to disable built-in CD/DVD burning feature in Windows Vista. Once the built-in CD/DVD burning function is turned off, Windows Vista will assume the CD/DVD burner/writer has only CD-ROM or DVD-ROM features, and thus will not open the CD/DVD drive tray automatically.
To disable Windows Vista built-in CD burning function, download the
DisableEnableCDBurning.zip file, and run the DisableCDBurning.reg to merge its value to registry to disable the CD/DVD burning feature in Vista. To revert and re-enable auto eject feature, execute the other file, EnableCDBurning.reg. More detailed description and ways to disable CD burning feature can be read here.