Dell Inc. has won the bidding for Aliso Viejo-based Quest Software Inc. with a cash offer of about $2.4 billion, the two companies announced today.

The deal values Quest shares at $28, a premium of nearly 50% from their price before a first bid became public in March.

Quest Chairman Vinny Smith will apparently sell his 34% stake in the deal, which has been approved by the boards of both companies.

Quest’s stock was steady in trading this morning, at slightly less than $28 a share for a market value of about $2.34 billion.

The offer by Round Rock, Texas-based Dell is believed to be its second in recent weeks. Industry watchers had speculated that Dell made an earlier bid in the chase for Quest.

The process started when Insight Ventures Partners, a private equity firm in New York, offered $2 billion for the company in March. The deal would have rolled over Smith’s shares and counted on borrowing.

An undisclosed bidder—widely believed to be Dell—countered with a $2.17 billion offer on June 15.

Insight Ventures on June 19 joined with San Francisco-based Vector Capital to offer $2.17 billion, with a rollover of most of Smith’s shares and $1.2 billion in borrowing. Quest’s board agreed to the deal, which included a $25 million break-up fee and an agreement to reimburse up to $12 million in expenses for the private equity firms.

Dell’s topping offer was announced prior to the market's opening today.

Quest makes software that helps manage and improve other business products from various companies, including Washington-based Microsoft Corp., IBM Corp. of New York, and Redwood Shores-based Oracle Corp. All had been considered prospective suitors for Quest amid a budding bidding war.

Quest is one of Orange County’s biggest software makers with $857 million sales in 2011. It has 3,000 workers overall, about 600 here.