HTC no longer supports the HTC Sync Manager program earlier than 2016. Most of the time this is caused by windows using a usb driver that it believes is compatible but truly isn't, so if you are having syncing issues always check to see what driver windows is trying to use or what it has your device listed under in the device manager. Try using different sync cables too if these other options are not helping. You can also try uninstalling HTC sync manager and then after rebooting the PC try installing the most current version of HTC Sync Manager to see if this corrects the issue by reinstalling the correct driver. You can also download only the usb driver from HTC if you did not want to use HTC Sync Manager to obtain the correct driver.
HTC SYNC MANAGER WINDOWS 10 DRIVERS
Installing HTC Sync Manager also installs the necessary drivers to be able to properly sync the phone with the PC. Make sure you have the most current HTC Sync Manager installed on the PC. The driver should be a usb driver from HTC, so if you notice it is using a windows usb driver or another driver not from HTC then unistall the driver and device and restart the PC.
Here you can check which driver the phone is using and if it is functioning properly. Open the device manager and locate the HTC one M8 and click on it to open its options/information menu. Now go to the device manager which is located in the settings menu under hardware and sound. With your PC turn on and booted into windows connect the phone with a usb sync cable.