format c:
It should not shutdown while that is happening...
if it does you are likely having hardware issues or your battery is dieing and your power cord isn't keeping your PC turned on.
If the computer is less than 1 year old call Dell and have them fix it under warranty.