I think this is a good example of what a company can do when it branches into different fields.
As expat123 pointed out, most of their revenues come from Windows and office.
In fact very few companies have dome well from diversifying their businesses (or, at least, their shareholders have not done well). Historically, GE, GEC, and a few other conglomerates have done well, but far more have under-performed and have been dismantled because the bits are worth more as separate businesses (Google for "conglomerate discount").
Of course, MS is not that diversified yet, and that is good for their shareholders.