I once reinstalled TRS2004, but I copied all the dvd files to my hard drive and installed from there. It went much faster. Might try that. Otherwise, it looks as if your system doesn't recognize drive D as your DVD drive.
I've done it both ways but last time I did it on my current desktop I'm pretty sure I installed from the original CDs (630 megs on CD1 and 550 megs on CD2). It was a kind of a cross my fingers operation since they were 16yrs old and they don't last forever. In my case I had to apply a patch file I saved to patch up to TRS04 SP4. I have my own backups but they were in another pile of cds - somewhere.
If you can get them all copied to HD I'd make backup copies of them. They fit easily on a single DVD.
System had to recognize and read drive D: to start the install before it needed to read D:\data2.cab. So maybe a problem with the CD. Hope it can read the entire CD to HD for you.
Some while ago I had issue trying to install a number of older versions of Trainz on Windows 10 laptop which was more than capable of supporting them to take on one of those visits to family. At the time there was a mixed response from other members both having, and not having their own issues all with Windows 10. I resolved the issue by dual booting with Linux. Peter