Had the "can't set com-state for "\.\COM5" issue with my Uno R3 as well.
The workaround is to use a USB to Serial board,
disconnect everything from the UNO
connect UNO-TX to the USB/Serial-RX
connect UNO-RX to the USB/Serial-TX
connect UNO-GND to USB/Serial-Ground
connect UNU-Vin to USB/Serial-VCC (5Volt)
Start compiling+uploading your sketch,
at the same time press RESET on the UNO and keep it pressed
as soon as the compiling is finished, release RESET and the upload will start.
This post was split from a totally unrelated topic and moved here
@nmvrouwe - do not hijack threads. If you have a new question then start a new thread of your own