What can you learn about entrepreneurship after seven years at technology behemoth Microsoft? Quite a lot, says serial entrepreneur and former Microsoft senior executive Naveen Jain.

Jain, who was a project and group manager at Microsoft from 1989 to 1996, has founded three companies -- Intelius, Moon Express and InfoSpace. He and his teams aren't just creating fluffy apps or silly games. Intelius, founded in 2003, provides information services to consumers and businesses, including background checks and identity theft protection. InfoSpace, launched in 1996, develops meta-search engines that aggregate results from Google, Yahoo and Bing, and display them in one place. And perhaps most intriguing, Jain founded Moon Express last year with the goal to mine the moon for elements that are rare on earth.

Before founding his companies, Jain, now 52, managed development of some of Microsoft's flagship products, including MS-DOS and early versions of Windows. He learned many of the lessons he has applied to his startups at Microsoft, where he worked closely with and observed founder Bill Gates in action.

Jain shared with us the top three lessons he learned from Gates about entrepreneurship and explained how they helped him after he founded his own companies.

1. Execute Flawlessly At Microsoft, Jain says Gates' early focus was to "out-execute" the company's competitors. That strategy taught Jain that entrepreneurs should focus on bringing a product to market that's better than all the other offerings on the block.

"Being a successful entrepreneur is not about breakthrough innovation," Jain says. "It's about flawless execution."

Before Microsoft Word, there was Word Perfect. Before Excel, there was Lotus 1-2-3, developed by Lotus Software, now part of IBM. Before MS-DOS, there was CP/M. In the end, Microsoft beat out those products in market share.

With Intelius, Jain set out to mirror Microsoft's achievement. When the company entered the information commerce market nine years ago, it faced about 100 other competitors, he says. Today, Jain says, "every company that used to be in business at that time, no longer exists."

From the start, Intelius' six cofounders focused on creating a superior product while the others concentrated on distribution and exclusive advertising relationships to bring users to the service. "It wasn't that we had some great idea," Jain says, "but we executed the existing idea well to become the market leader with $150 million in [annual] revenue."

2. Hire People Who Are Unlike YouWhile at Microsoft, Jain noticed that Gates surrounded himself with people of diverse backgrounds. "In the early days, the reason for Microsoft's success was a great vision by Bill Gates," Jain says, "but at the same time, he had probably one of the best operations people: Jon Shirley." Shirley served as president from 1983 to 1990.

Jain also considers Steve Ballmer, Microsoft's current CEO, very different from Gates. "Bill Gates is the technical genius while Ballmer is the marketing guru," Jain says. "They complemented each other's style well."

Intelius followed Gates' lesson with six entrepreneurs of different backgrounds: three engineers, an operations expert, a product-development chief and Jain as CEO. "We have a tendency to like people who are like us," Jain says. "But when you are running a company, you have to find people who are unlike you because you want people who are complementary to you."

3. Be Agile, But PersistentJain considers Gates considerably adept at deciding which product lines to continue and which to terminate. This, in turn, helps foster a steady but agile business culture.

For example, Microsoft has persisted with such flagship products as Windows, Word and Excel, even though not all of them were instant hits. "I worked on Windows 1.0, 2.0 and Windows/386, and it wasn't until Windows 3.0 that Microsoft Windows actually caught on," Jain says. Imagine what a mistake it would have been if Microsoft had stopped producing Windows at version 2.0.

But Microsoft is equally comfortable shutting down product lines that underperform, Jain says. For example, Microsoft launched a user interface called Microsoft Bob in 1995 that initially looked promising. It aimed to humanize computing with a game-like experience, but it flopped.

The key is to know when to improve a product that hasn't quite hit the mark but be flexible enough to call it quits and devote resources to something more promising, Jain advises. For example, Intelius launched a product that aimed to provide data to private investigators. It attracted a significant number of customers, but the company decided the market was too small at $10 million to $20 million and canned the product.

"It doesn't matter where you start from," Jain says. "You constantly believe, persist, modify and change who you are until you find the right marketplace."