What makes you think desktops and laptops are going to stop being relevant within our lifetimes? In reality, Microsoft is in a very safe position, only facing competition in markets they never had a strong hold on to begin with. In the markets Microsoft is really dominant in they are in almost no danger. Let's put it this way: top business-user reasons for virtualization on GNU/Linux are running Windows Server to run Exchange and running Windows to run stock market software. Try taking Office away from the big business customers who bring major income to Microsoft.
The comparison to railroads is apt. Railroads are still immensely important, even if people no longer romanticize them. Innovations in railroad technology are still very important. The financial difficulties railroads faced in the middle of the 20th century had more to do with the government promoting automobiles than with the superiority of cars and trucks. If Microsoft is the technology world's' equivalent of a railroad they are in a pretty good position -- they might not be the company everyone is talking about but they will be the company that everyone is dependent on.