Import a view during installation I want to import a view during the installation of Drupal.

Does anybody have an idea on how to do this?
You don't usually programmability import views, instead you provides default ones by implementing hook_views_api() (usually in MODULE.module) and hook_views_default_views() (usually in MODULE.views_default.inc). Your module should return an array of views object has build with the code provided by the export views UI:

/**
 * Implementation of hook_views_api().
 */
function MODULE_views_api() {
  return array(
    'api' =&gt; '3.0',
  );
}

/**
 * Implements hook_views_default_views().
 */
function MODULE_views_default_views() {
  $export = array();

  $view = new view;
  $view-&gt;name = 'foo';
  $view-&gt;description = '';
  $view-&gt;tag = 'default';
  $view-&gt;base_table = 'node';
  $view-&gt;human_name = 'Foo';

  [ ... ]

  $export['foo'] = $view;

  return $export;
}


The Features module can generate the code for this.