Firstly, the article I referred to for this setup is here and here are the steps I followed:
1. Ensure that you have Windows 7 x64 edition and SQL Server 2008 R2 x64 installed on your . The SQL Server 2008 R2 installation can be the Developer Edition or the Express Edition, whichever is relevant in your case.
2. Copy all the SharePoint setup files to c:\sharepointfiles folder and then open the config.xml file from c:\sharepointfiles\files\setup using notepad. In this file, add the following line
<Setting Id="AllowWindowsClientInstall" Value="True"/>
Ensure that you add this line anywhere between <Configuration> and </Configuration> tags. Save the file after you add this line.
3. Install the following components
a. Windows Identity Foundation (Click Here) – Install the "Windows6.1-KB974405-x64.msu" file
b. Chart Controls (Click Here) – not required if you're planning to install SharePoint 2010 Foundation
4. Install the required "Windows Features" by pasting the following text in the command prompt and then press "Enter" (ensure that this is a single line, no breaks) – better way is to paste this in notepad and ensure that "word wrap" is off and then paste this into the command prompt.
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation
5. You can now run the Setup.exe from the SharePoint installation files and proceed as a normal installation
You can also refer to the article I mentioned earlier (here) from which I have successfully installed SharePoint 2010 and SharePoint 2010 Foundation on Windows 7 x64 (Enterprise Edition).