I think the situation can be far worse than that
A few years ago I was doing support for an industrial company making plastic wrapping. As usual, I was working in the IT Admin's bureau because that's where the development PC was, so I was privy to all their conversations, and one conversation was about updating to Windows 7 (at the time).
Their situation is as follows : their production floor is based on machines that are piloted by WinXP PCs who use drivers that are undocumented, talking to the machines using a protocol nobody knows. The pilot app was coded about twenty years ago and has survived upgrades from Win 3.11 to Win XP, because the guy who coded it all was still around to help. That is no longer the case (and that there is your long lost source code).
So, in order to upgrade the PCs, either they have to commission the complete rewrite of the drivers and the apps based on unknown rules, which will take vast amounts of time and an ungodly amount of money, or they can replace the production machines, which will cost upwards of a quarter million per unit, which them has to be configured with a new PC and a new app, and that throws their entire production line under the bus for weeks at a time.
So yeah, upgrading Windows has kinda hit a brick wall there. Thankfully, the admin is not stupid enough to have the XP systems connected to the Internet, but they are on the network, so there is a risk despite the firewall cutting them off from all but the admin PC that is overseeing them (not the admin's PC, that's a different one).