Hook into update/install process callback (Update manager) - providing a custom message after installing a module from URL After installing a module from a given URL (on admin/modules/install), I can see the following messages:



So it outputs 3 links in the "Next steps" list, but I would like to hook into the update callback process, extend this list, and provide another link which points to a callback page defined by my own module, where I can enable the module immediately. I don't need help for the latter, only for the way to hook into the process of altering/extending the messages in the result.
After hooking into to the process of generating the output (hooking into the callback process), I will need to know the module's machine name.  

This is what the expected result would look like:



OR



OR



What would be the appropriate way to provide custom messages in the update callback?

The "Installation was completed successfully." text is defined by update_authorize_install_batch_finished() in modules/update/update.authorize.inc (and gets into $_SESSION['authorize_results']['page_message'] as an array), and the "Next steps" list is provided by ModuleUpdater::postInstallTasks in modules/system/system.updater.inc.
I think the easiest way would be to extend the ModuleUpdater class to provide your own postInstallTasks() implementation:

class MyModuleUpdater extends ModuleUpdater {

  /**
   * Overrides ModuleUpdater::postInstallTasks().
   */
  public function postInstallTasks() {
    return array(
      l(t('Enable @module module', array('@module' =&gt; $this-&gt;title)), 'admin/modules/enable/' . $this-&gt;name),
      l(t('Install another module'), 'admin/modules/install'),
      l(t('Enable newly added modules'), 'admin/modules'),
      l(t('Administration pages'), 'admin'),
    );
  }    

}


And then implement hook_updater_info_alter() to let Drupal know you want to use that class instead of the default:

function MYMODULE_updater_info_alter(&amp;$updaters) {
  $updaters['module']['class'] = 'MyModuleUpdater';
}


You'll also need to add this to your module's .info file so the new class can be autoloaded:

files[] = path/to/MyModuleUpdater.php


Once you clear the caches the change should take effect.