It depends on where during the setup and install process you get a blue screen error.
If it happens at the point or just before windows setup and install asks you where, or what hard disk device you wish to install windows to, it can be down to how you have setup the sata ports of the system if it has Sata ports, and the mode that is selected for the Sata ports in the motherboard bios settings.
You should set the mode to: Ahci
Also check if there is an option to enable detection of legacy usb devices, and the option is enabled in the bios.
Check that Sata chip set of the motherboard is enabled.
For the most part a blue screen error when running windows setup and install is down to the incorrect sata mode selected in the bios. A blue screen error is the result of windows not being able to see a storage device connected to a interface such as a sata port of the motherboard due to, Sata mode being selected where it should be as said set to Ahci mode.