"Windows cannot be installed to this hard disk space. The selected disk has maximum number of partitions of this type"
How should I prevent this and install windows 8???
MBR disks have a partition table with four slots for up to four partitions in the MBR (master boot record, first sector, cf. wikipedia.) Apparently you already use all
available (= 4) slots for four primary partitions, or for one extended plus three primary partitions. Presumably these four partitions occupy your complete disk. Check out disk management (diskmgmt.msc), it shows you how these
partitions are arranged on your box.
If you have lots of free space in one of these partitions, and
if it's formatted as NTFS, and
if you defragmented it, you should be able to shrink (= split) it into a smaller NTFS, and the remaining unused space.
After that you could make your (big) windows partition (tyically C:, check out
set systemroot on a command line) bootable with bcdboot /s C:, for details see
bcdboot /?. This creates a new C:\boot\BCD with a new C:\bootmgr in addition to similar files on another (small) system partition. You can compare the output of
bcdedit (old BCD) with bcdedit /store C:\boot\BCD (new BCD) to check that they are in essence identical; notably you want the same locale (e.g., en-US) and the same recovery sequence.
If that's as it should be flag your big windows partition with the new BCD as "active", instead of the small partition (old BCD), and reboot. If that fails you're in trouble, make sure that your rescue CD or Windows 7 setup DVD works before you try
it.
Otherwise (reboot worked) you can delete the partition with the old BCD, and at that point you have the unused disk space and an unused slot in the partition table to install another OS. I have not the faintest if that's good enough for a dual boot
windows 7 + 8 scenario, find and read several tutorials explaining how this is supposed to work.