Hello and thank you for choosing JUSTANSWER.com
When it starts setting up the services for the first time, it CAN TAKE AWHILE.....so how long did you let it stay on, and in this process? Hours? How many?
If you are stuck, then you might have to do a REinstall, with the media on a CD or USB, that you can install from.
Sometimes, doing a factory reset, can cause the system to hang, and if this is the case, your only choice is to WIpe the harddrive and do a REinstall of the operating system from a CD, DVD, or USB drive.