The reason of r failure in both the cases is device is not getting detected
If you can ...can you try this ?
Connect the phone normally to PC/laptop
Got to the downloaded root folder
Then open a terminal ( generally you can open terminal like this ... Hold shift + right click -> open terminal window here )
In the terminal type this command
adb devices
This should list your phone's serial number if connected properly
Otherwise either drivers or wire/connection problem ( which happens pretty rarely

)
BTW are you on windows 8 ? Then those drivers might not work properly ..one way you can get proper drivers is ..first uninstall the drivers you have ..then go to hyc website and install HTC sync ..then go to control panel and uninstall all HTC crap except HTC USB driver ..then reboot and try again
( if you feel that this is pain in ass ..then I would suggest you to get root via standard recovery method or using hansoon tool kit ?)
Sent from my Nexus 7 using XDA Premium 4 mobile app