Steps to Install Android 4.4.4 KitKat on HTC One M8 with CyanogenMod 11 M9 ROM
Step-1: Download CM11 M9 Android 4.4.4 ROM for HTC One (M8) to your computer and extract boot.img from the zip file in a separate folder. Download Google Apps as well.
Step-2: Connect and mount your HTC One (M8) USB (mass) memory on your computer with USB cable.
Step-3: Now copy the downloaded Android 4.4.4 ROM zip and Google Apps zip files to the root folder on phone's SD card.
Step-4: Copy the boot.img file to android-sdk-windowsplatform-tools directory.
Step-5: Power off your phone.
Step-6: Now boot into Bootloader/Fastboot Mode. To do so, turn ON the phone while pressing and holding the Volume Down and Power buttons.
Step-7: After booting into Fastboot mode (on your phone), navigate to android-sdk-windowsplatform-tools directory (on your computer) and open Command Prompt (hold Shift and Right-click to Open Command Prompt).
Step-8: Type the following command and press Enter:
fastboot flash boot boot.img
Step-9: Then, input the following command and press Enter:
fastboot reboot
Step-10: Follow onscreen instructions and select BOOTLOADER to enter RECOVERY.
Step-11: Once you are in ClockworkMod Recovery, perform a full data wipe by selecting "wipe data/factory reset". Hit Power button to select everything while in Recovery Mode.
Step-12: Perform a cache wipe by selecting "wipe cache partition".
Step-13: Perform a dalvik cache wipe as well to prevent boot loops or any other errors. From CWM recovery, go to 'advanced' and then select "wipe dalvik cache".
Step-14: Return to the main recovery screen and select "install zip from SD card".
Step-15: Now select "choose zip from sdcard". Using volume keys, navigate to Android 4.4.4 ROM zip file that you copied to your SD card and select it using the Power button. Confirm the installation on next screen and the installation procedure should begin.
Google Apps: Repeat the above step for installing Gapps on your phone.
Step-16: Once installation completes, choose "+++++Go Back+++++" and reboot the phone by tapping "reboot system now" in the recovery menu.
HTC One M8 will boot now and it might take about 5 minutes to to complete first boot after ROM installation. So, please be patient.
CM11 M9 based Android 4.4.4 KitKat custom ROM is now installed on your phone. Go to Settings > About phone to verify installation.