I have InDesign CS4 and am trying to install it on a Windows10 machine. I'm receiving a "setup has encountered an error and cannot continue" message
That is a really old version of InDesign. You should consider upgrading to InDesign CC2015/2017. You can subscribe with a monthly payment that if you're only using it occasionally you can pay a bit extra and subscribe for the month(s) you need to use it.
Please try the suggestion from this help article: Error: "Setup has encountered...," "Another installation is already in progress," or "Fatal Error occurs" when installin…