Updated from July 20

Microsoft's ( MSFT) fourth-quarter earnings fell from a year ago, but the company gave shareholders plenty to cheer about with a full-year outlook above expectations and a plan to buy back $20 billion of stock.

CFO Chris Liddle also lowered the stress level around the upcoming launch of the next generation of Windows, saying the key product is still on track for availability to businesses in November and consumers in January. And the company now expects to sell a total of 13 million to 15 million of its Xbox 360 consoles by the end of fiscal 2007, Liddle said during a conference call with analysts.

The news sparked a rare Microsoft rally; in early Friday trading shares were up $1.18, or nearly 5.2%, to $24.03.

The company said late Thursday that revenue in the June quarter totaled $11.8 billion, an increase of 16% over the same quarter last year, the strongest finish to a fiscal year in seven years. Net income was $2.83 billion, or 28 cents a share, including a 3-cent charge for legal expenses.

Without the charge, the company beat Wall Street's bottom-line expectations by a penny a share; analysts were looking for a 30-cent profit on sales of $11.6 billion.

A year earlier, Microsoft earned $3.7 billion, or 34 cents a share.

Management gave guidance for the first quarter of fiscal 2007, saying it expects revenue to range from $10.6 to $10.8 billion, with earnings per share of 30 cents to 32 cents. Analysts polled by Thomson First Call were looking for a profit of 31 cents a share with revenue of $10.98 billion.

For the full fiscal year, Microsoft forecast revenue ranging from $49.7 billion to $50.7 billion; EPS will range from $1.43 to $1.47. Wall Street was expecting EPS of $1.40 on revenue of $49.8 billion.

The software giant also said its board has authorized a $20 billion share buyback to be completed by mid-August and an additional offer for up to $20 billion to be completed by 2011. An earlier buyback of $30 billion has been completed, the company said.

The August tender offer is somewhat complicated, but in effect, it puts a floor of $22.50 under the stock. Microsoft will buy back shares at a price ranging from $22.50 to $24.75 a share using a modified version of the so-called Dutch auction, in which shareholders bid and Microsoft accepts the lowest price. Terms of the 2011 offer were not spelled out.

Despite a good deal of negative sentiment concerning the performance of the computer industry so far this year, Microsoft's most PC-dependent business unit did well. The company's Client group, which sells Windows, grew 12% year over year, and Microsoft said the PC market grew by 11% to 12%. The Information Worker group, which sells Office, did less well, growing by only 6.4%.

Led by the SQL Server 2005, which launched to good reviews some 18 months ago, the Server group grew by a strong 18%.

Microsoft Business Solutions, which includes the company's Dynamics products, turned its first-ever profit: $38 million on sales of $280 million, up from $242 million. But the company's troubled MSN unit actually shrank by about 3% in sales to $580 million and lost $190 million.

The Home and Entertainment group, responsible for the Xbox 360, grew revenue strongly, to $1.14 billion from $587 million the year before. But the unit also doubled its loss to $414 million.