How to define settings from an install profile I am looking for the way to set some settings at the install step.

function genius_profile_final() {
  // Enable default permissions for system roles.
  $filtered_html_permission = filter_permission_name($filtered_html_format);
  user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content', 'access comments', $filtered_html_permission));
  user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access content', 'access comments', 'post comments', 'skip comment approval', $filtered_html_permission));

  // Create a default role for site administrators, with all available permissions assigned.
  $admin_role = new stdClass();
  $admin_role-&gt;name = 'administrator';
  $admin_role-&gt;weight = 2;
  user_role_save($admin_role);
  user_role_grant_permissions($admin_role-&gt;rid, array_keys(module_invoke_all('permission')));
  // Set this as the administrator role.
  variable_set('user_admin_role', $admin_role-&gt;rid);
  // Assign user 1 the "administrator" role.
  db_insert('users_roles')
    -&gt;fields(array('uid' =&gt; 1, 'rid' =&gt; $admin_role-&gt;rid))
    -&gt;execute();

  // Create a role for webmaster
  $webmaster_role = new stdClass();
  $webmaster_role-&gt;name = 'webmaster';
  $webmaster_role-&gt;weight = 3;
  user_role_save($webmaster_role);
  user_role_grant_permissions($webmaster_role-&gt;rid, array_keys(module_invoke_all('permission')));

  variable_set('taxonomy_menu_vocab_menu_rubric', 'menu-genius-navigation-menu');
  variable_set('taxonomy_menu_vocab_parent_rubric', 0);
  menu_rebuild();

  // Set the regional settings First day to Monday
  variable_set('date_first_day', 1);

  // The return message is optional, if you omit it the default will be used.
  return '&lt;p&gt;'. (drupal_set_message() ? t('Please review the messages above before continuing on to &lt;a href="@url"&gt;your new Profile Name site&lt;/a&gt;.', array('@url' =&gt; url(''))) : t('You may now visit &lt;a href="@url"&gt;your new Profile Name site&lt;/a&gt;.', array('@url' =&gt; url('')))) .'&lt;/p&gt;';
}


In genius_profile_final(), where as I understood Drupal is fully bootstrapped, I have variable_set('date_first_day', 1), but the first day of the week still is set to Sunday,  after the installation. So it is not working as I expected.

I am using the taxonomy_menu module, and I would like to set at the installation step the menu to be linked with the taxonomy. Because I am installing something known, I know the variable names that might be set are:

variable_set('taxonomy_menu_vocab_menu_rubric', 'menu-genius-navigation-menu');
variable_set('taxonomy_menu_vocab_parent_rubric', 0);


This is not working neither.

I have been following https://www.drupal.org/node/1022020 and looking at other examples but I have had no luck to find how to do this.

Is it possible to change settings in an install profile or are there any restriction? In that case, what restrictions are?

What am I doing wrong?
I can't find a hook called hook_profile_final on drupal.org. I also can't see where you found it on the link you're using (https://www.drupal.org/node/1022020). You are using an outdated version of the tutorial (https://www.drupal.org/node/67921).

You need to implement hook_install_tasks_alter https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_install_tasks_alter/7 and change a task, or do a form alter of the config page.