I can not answer this question 100% but I have intended to reinstal the operating system and used the repair option and it has installed the whole system without formating and has left all the files there (which was good).
This was used due to a system crash so maybe you could use this method, Im sure someone may be able to answer it with a bit more detail though.