diff --git a/includes/install.core.inc b/includes/install.core.inc
index 3791d71..7096591 100644
--- a/includes/install.core.inc
+++ b/includes/install.core.inc
@@ -1490,9 +1490,6 @@ function install_import_locales_remaining(&$install_state) {
  */
 function install_finished(&$install_state) {
   drupal_set_title(st('@drupal installation complete', array('@drupal' => drupal_install_profile_distribution_name())), PASS_THROUGH);
-  $messages = drupal_set_message();
-  $output = '<p>' . st('Congratulations, you installed @drupal!', array('@drupal' => drupal_install_profile_distribution_name())) . '</p>';
-  $output .= '<p>' . (isset($messages['error']) ? st('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => url(''))) : st('<a href="@url">Visit your new site</a>.', array('@url' => url('')))) . '</p>';
 
   // Flush all caches to ensure that any full bootstraps during the installer
   // do not leave stale cached data, and that any content types or other items
@@ -1517,6 +1514,20 @@ function install_finished(&$install_state) {
   // Will also trigger indexing of profile-supplied content or feeds.
   drupal_cron_run();
 
+  $success_message = st('Congratulations, you installed @drupal!', array('@drupal' => drupal_install_profile_distribution_name()));
+  // If there were no error messages set during the process, go straight to the
+  // front page.
+  if (!isset($messages['error'])) {
+    drupal_set_message($success_message, 'status');
+    drupal_goto('');
+  }
+  // Otherwise, stay on the installation screen and display the error messages.
+  else {
+    $output = '<p>' . $success_message . '</p>';
+    $output .= '<p>' . st('Review the messages above before visiting <a href="@url">your new site</a>.', array('@url' => url(''))) . '</p>';
+    return $output;
+  }
+
   return $output;
 }
 
