1. Either you can Copy All Your DATA in External HDD, then deallocate all the space of HDD (i.e delete all partitions), you can do this by booting a flash drive (eg. Pendrive atleast 8GB Recommended) with an windows 8 ISO file... Boot from your Flash Drive, after deleting all partitions, create new partitions as per your need... there would be option to create/delete/format an partition, if not the click advance options or something like that, you would have it there...
One more thing, the would be an option to upgrade or custom, select custom...
After you have created partitions, select the partition in which you want to install windows (usually C: ), and click install. It would roughly take 10-15 Mintues...
Or
2. Download Windows 8.1 ISO file, extract it in a folder (don't boot it as it may still show the same error), after extracting that folder you will find a setup.exe file... Just open it, it will automatically detect in which drive you Operating System(OS) is installed and install it's OS, no need to copy your data from PC to External HDD;
After installation check your C_Drive for windows.old folder and delete it, as you don't need it anymore...
if its doesn't select the Drive automatically, then use custom option and select the drive in which the OS is installed (C: Drive)... The process of installation may take more time and your PC restarts often (3-4 times)...
if after extracting and executing the setup.exe file, and error message pops up the boot the ISO image in a Flash Drive and follow the 1st method mentioned above, but i guess that won't be the case...