diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index c63d00a..5f928de 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1176,19 +1176,32 @@ function system_modules_submit($form, &$form_state) {
   // Reverse the 'enable' list, to order dependencies before dependents.
   krsort($actions['enable']);
 
-  // Installs, enables, and disables modules.
-  module_enable($actions['enable'], FALSE);
-  module_disable($actions['disable'], FALSE);
+  $batch = array(
+    'title' => t('Modules'),
+    'operations' => array(
+      array('module_enable', array($actions['enable'], FALSE)),
+      array('module_disable', array($actions['disable'], FALSE)),
+      array('module_list', array(TRUE)),
+      array('drupal_flush_all_caches'),
+    ),
+    'finished' => 'system_modules_batch_finished',
+  );
 
-  // Gets module list after install process, flushes caches and displays a
-  // message if there are changes.
-  $post_install_list = module_list(TRUE);
-  if ($pre_install_list != $post_install_list) {
-    drupal_flush_all_caches();
-    drupal_set_message(t('The configuration options have been saved.'));
-  }
+  batch_set($batch);
+  batch_process('admin/modules');
+}
 
-  $form_state['redirect'] = 'admin/modules';
+/**
+ * Batch Callback; Finished processing the modules page changes.
+ */
+function system_modules_batch_finished($success, $results, $operations) {
+  if ($success) {
+    $message = t('The configuration options have been saved.');
+  }
+  else {
+    $message = t('An error occurred while saving the configuration.');
+  }
+  drupal_set_message($message);
 }
 
 /**
