Accessing values entered in custom fields added to install_configure_form
Altering the site configuration form is not different from altering other forms, as done from a module.

If myprofile.profile is used in your profile, its content should be similar to the following one.

  function myprofile_form_install_configure_form_alter(&amp;$form, $form_state) {
    $form['site_information']['site_name']['#default_value'] = st('Organization name');
    $form['site_information']['org_short_name'] = array(
      '#type' =&gt; 'textfield',
        '#title' =&gt; st('Short name'),
        '#description' =&gt; st('This will be used as a casual reference to the association throughout the site. If left blank, the Site name will be used.'),
      '#attributes' =&gt; ['placeholder' =&gt; 'e.g. FBI'],
        '#size' =&gt; 60,
        '#maxlength' =&gt; 60,
    );
    // Move the email to the bottom
    $form['site_information']['site_mail']['#weight'] = 1;

    $form['actions']['submit']['#submit'][] = 'myprofile_install_configure_form_submit';
  }

  // Notice which argument is passed by reference.
  function myprofile_install_configure_form_submit($form, &amp;$form_state) {
    $name = !empty($form_state['values']['org_short_name']) ? $form_state['values']['org_short_name'] : $form_state['values']['site_name'];

    variable_set('short_name', $name);
  }


As for variable_set() working in this case, it works, since install_configure_form_submit() (the default submission handler for the site configuration form) uses it.

  variable_set('site_name', $form_state['values']['site_name']);
  variable_set('site_mail', $form_state['values']['site_mail']);
  variable_set('date_default_timezone', $form_state['values']['date_default_timezone']);