This is for windows xp. I think it's the same or similar for vista and 7
Click start
control panel
sounds and audio devices
Click the sounds tab
in program events, scroll down to exit windows, click on it, change "windows xp shutdown" to none
Scroll to start windows change "windows xp startup" to none
Click apply then click ok