When installing SharePoint 2013 Preview on Windows 2012, the prerequisites installer fails with the error "AppFabric installation failed because installer MSI returned with error code : 1603". What's irritating about this error is that it's pretty generic and tells very little about what you need to know to get it fixed. It's a standard MSI error message. To add salt to the wound, the situation gets messier everytime you try to uninstall or reinstall.
I searched all over the inter-webs and some suggested yanking out the PSModulePath from the EnvironmentVariables, well I tried that and still no luck. In fact, I'd advice against deleting this variable. Rather keep it there, as there are other applications which might be referencing the same variable.
The issue here seems to be that the path to the PowerShell executable that's needed for the AppFabric installation was incorrect.
Enough talking, how do we fix this error?..
Well, as it turns that appending this path to PSModulePath (System Properties -> Environment Variables -> System Variables) entry solves the problem... %SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
All the best.
Update: 28 January 2012
Added a few graphics for simplicity...