Go to Control Panel > Power Options > Alarms and click on Alarm Action button. Uncheck the Alarm Action box in order to get sound alarms instead of having your computer shut down or hibernate. Also from the Alarm Action menu you can select the type of alarm notification and the threshold power level.