To install SharePoint Foundation 2010 on Windows 7/8, you need to modify the config.xml file. However, after extracting the setup files, the config.xml file was nowhere to be seen in the Setup folder. To get the installation going, I had to create the file myself. Here is the content that goes into it:

   <Package Id="sts">
      <Setting Id="SETUPTYPE" Value="CLEAN_INSTALL"/>
   <DATADIR Value="%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\Data"/>
   <Logging Type="verbose" Path="%temp%" Template="Microsoft SharePoint Foundation 2010 Setup *.log"/>
   <Setting Id="UsingUIInstallMode" Value="1"/>
   <Setting Id="SETUP_REBOOT" Value="Never"/>
   <Setting Id="AllowWindowsClientInstall" Value="True"/>

And to force the setup.exe to use it, we need to apply the /config switch when starting setup.exe, i.e.: setup.exe /config Setup\config.xml

Other useful links for installing SharePoint Foundation 2010 on Windows 8:

Hope this helps.