After that, you must Copy then paste the boot.img file to android-sdk-windows\platform-tools directory. You need to switch off the device and plug it out from the PC. Enter Bootloader/fastboot mode by pressing the power and volume down buttons together. Now, Go to android-sdk-windows\platform-tools directory (on PC) and open Command Prompt (Shift + Right-click > Open Command Prompt).
After this, Type: fastboot flash boot boot.img. Then, you must type fastboot reboot. Choose bootloader and go to recovery using on screen instructions. After this, choose ‘Wipe’ to delete of data then ‘Swipe to Factory Reset’.
Head over to the main menu and choose ‘Install’.
Choose the copied ZIP file on the phone. Then, you must choose swipe to confirm flash. After installation is complete, repeat same process for Google Apps. In case, then phone gets into any trouble or boot loops, you must tap wipe cache/dalvik button. Following that, reboot your device. In order to verify the update, head over to Settings> About Phone and check.
People who are waiting for the official Marshmallow upgrade for their HTC devices will get it soon enough. For now, patience is advised since HTC has a tendency of delaying their release. However, if and when it is finally revealed, the update should be bug free.
Stay tuned for more updates on HTC One M8!