Ok so you installed HTC Sync and thus should have the latest drivers for HTC One M8 installed!? If not download newest version from HTC and reinstall.
Regarding adb fastboot: do you have the universal adb drivers which solve problems with Windows 8/8.1? If not you can find them here on xda for download. Don't have the link at hand as I'm at work at the moment.
Sent from my HTC One_M8 using XDA Free mobile app
Mobile: One M8 Gunmetal: UNLOCK - S-OFF (SunShine) - WWE
CID: HTC__001 (T-MOB101)
FW: 2.22.401.5 (18.104.22.168)
ROM: Stock - SuperSU
Retired: Desire (CWM, Cyanogen), Sensation (Unlocked, S-On, CWM, root), One X (Unlocked, TWRP, Cyanogen), One (M7) (firewater S-Off, TWRP, ViperOne), Moto G (Unlocked, S-On, CWM, CM11), One (M8) GER Silver (SunShine S-Off, TWRP, ViperOne 2.2.0).