Matlab 2012a is compatible with Windows7 in general.
You hesitate to explain, what "does not work" explicitly means. So I can only guess: When you install the 32-bit Matlab on a 64 bit Windows, the program folder is created in "C:\Program Files (x86)". Some functions will fail due to the spaces in the path. Therefore I've created "C:\ProgramFiles_" in addition and create the 32-bit Matlab there.