Ram Gopinathan has created a nice script to automate the installation of SharePoint 2010 on Windows 7. 

This script which is hosted on TechNet scripts automatically completes the following steps:

  1. Add/Remove windows Components
  2. Extract the OfficeServer.exe file
  3. Downloads Pre-Reqs from Microsoft Downloads site
  4. Install Pre-Reqs
  5. Creates a Config.xml file for Windows Client Install (SingleServer mode)
  6. Install SharePoint 2010

Once the script has completed you do need to manually run the Products and Configuration Wizard for SharePoint.

This script is only intended to install SharePoint 2010 on Windows 7 for development purposes.  Do not use the script for installing SharePoint 2010 on any other operating system.