If you haven't read this Microsoft tutorial, then start there.
https://technet.micr...4(v=ws.10).aspx
NOTE: One thing missing from the tutorial is to add the locale setting in the boot configuration if you want the fancy boot splash screen. Also, if you copy the boot configuration from the DVD you may want to disable the "Emergency Management Services (EMS)" in the boot configuration.
Windows PE still assigns drive X: to the boot volume even when running from a hard disk. Drive C: is usually assigned to the first primary partition that is not Windows PE. You can change the drive letter by editing values for the registry key "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices". However you also have to change all the shortcuts and other registry settings that use "X:". If some things that you want to use require a drive C: then you may want to create a C: mount point that is aliased to X:.
Under the "Build" folder in the project settings, make sure that you have check marked the "Run all programs from RAM" setting and you DO want to select the option for Build Model "In RAM". You want all the programs copied into the BOOT.WIM "RAM" image even though you will be extracting that to a hard disk partition. The "In RAM" setting really means "in the BOOT.WIM image".
Building with any option other than "In RAM" splits up the files between the ISO filesystem on the DVD/CD and the BOOT.WIM image. You don't want to do that. The only reason to not use "In RAM" is if you need to run some files directly from the DVD/CD. Usually that is because there is not enough RAM to load the RAM disk image. You then have to leave the DVD/CD in while running the system and avoid using programs that might eject the DVD/CD. NOTE: You can still extract a huge BOOT.WIM ram disk image to the hard disk even if you can't boot the RAM disk image beceause of RAM limitations.
Assuming that you build everything in RAM you only need the X: drive letter assigned (done automatically by Windows PE). If you build some programs to run from the DVD/CD (not In RAM) then you might need a drive Y: pointing to those files. You can copy the drive Y: files to the hard disk from the ISO filesystem of the disc. Just make sure to clear the read-only attribute. Windows treats "System" and "Read Only" flags for folders as "customized folder" flags. I'm not sure what you have to change to assign drive Y: to a hard disk instead of the DVD/CD.
Make sure that you have a driver for your hard disk controller installed in Windows PE. You might not if you are booting some other DVD/CD to copy the BOOT.WIM files to the hard disk.
Please post more information about exactly where the system crashes and what messages are displayed.