Does your laptop sleep/hibernate or something when you shut the lid?
Try "Power Options" in the control panel, then "Change plan settings", and set "Put the computer to sleep" to "never" and also try "Turn off the display" > "Never".
Set closing the lid to do nothing should do it -- and also making it not sleep after inactivity.
Just wanted to give a quick warning:
most laptops aren't made to be run for excessive amounts of time. Continuous botting could cause you problems down the road. If you do bot a lot on the laptop try to keep it cool (not on a bed or blanket.)
Go with Sonic's solution on this. Also, you might need to change a setting that does not allow the computer to sleep if left idling for long - simply change this setting 'For when on external power'.