I had a broken scanner around here, so I decided to do something with it. I decided to install the lamp inside my computer. And its worked!!! So I’ll try to explain what I did to make it work. I believe it’s different for different scanners, but you can try to figure out for your!You can check it out over here.
Casemodding guide: using a scanner lamp inside your case

Here's a guide on using a flatbed scanner lamp inside your computer case: