I managed to solve it following this post:
https://forum.derivative.ca/t/resolved-touchdesigner-wont-run-error-when-reinstalling-key-retrieval-error/269765/6
There seems to have been an error in the Windows repository; rebuilding fixed it for me (even though I have read many times that you normally would never do this).