Error during formatting the window xp

I got some virus problem so I thought to format my C drive only. But during the formatting process I got error related to "Realtek". It's asking to install/uninstall the hardware. For the problem of my Audio device I installed the Realtek but I didn’t get installed properly.
I pressed F8 to run the system in Safe Mode to uninstall "Realtek" but instead of running in Safe Mode system restarting again and again.
Please anyone suggest me the best solution.
