EXPAND FOR SUMMARY
IMPORTANT! If you try this and it does not work, then commenting won't help you! Go to a forum like Apple Support Forums or Ask Different.
"An error occurred while preparing the installation. Try running this application again." appears during the "install verification" phase of attempts to install Mac OS X. Digging a bit, it turned out that the reason is that when the clock has been reset, this (DRM?) verification fails without specifying the reason.
To fix, go into the Terminal and manually set the time to current.
The format is
date mmddHHMMyyyy
That is, day of month, day, hour, minute, year, e.g.
date 040310182013
for April 3rd, 2013 at 10:18
Also, if this was helpful to you, consider paying it forward by making someone else's day better, making a blog post about something that you had to figure out for yourself, as well, participating in an online group to help others (like the Ask Different site for Apple questions) or flat out kissing someone who is short of kisses. Cheers!