Install custom module into modules/custom folder I've just made a facebook module, it's working nicely, the only thing is that it doesn't install into the modules/custom folder. The module installs into the modules folder (the custom folder is located inside this modules folder). 

How can I make sure the module installs into modules/custom?

This is my .install file.

/**
 * @file
 * Install, update and uninstall functions for the facebooklikebox module.
 */

/**
 * Implements hook_uninstall().
 */
function facebooklikebox_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE '%facebooklikebox%'");
  cache_clear_all('variables', 'cache');
}

function facebooklikebox_update_6101() {
  // Get the default settings
  drupal_load('module', 'facebooklikebox');
  $defaults = _facebooklikebox_get_settings(TRUE);

  // Define a settings array based on the variables already set (or their defaults)
  $settings = array(
    'facebooklikebox_pageurl' =&gt; variable_get('facebooklikebox_pageurl', 0),
    'facebooklikebox_height' =&gt; variable_get('facebooklikebox_height', 0),
    'facebooklikebox_width' =&gt; variable_get('facebooklikebox_width', 0),
    'facebooklikebox_bordercolor' =&gt; variable_get('facebooklikebox_bordercolor', 0),
    'facebooklikebox_showfaces' =&gt; variable_get('facebooklikebox_showfaces', 0),
    'facebooklikebox_showstream' =&gt; variable_get('facebooklikebox_showstream', 0),
    'facebooklikebox_showheader' =&gt; variable_get('facebooklikebox_showheader', 0),

  );

  // If a setting matches the default value, unset it (we wont need to store it)
  foreach ($settings as $key =&gt; $value) {
    // We used to use -1 for disabled, convert this to 0 for the new diabled
    if ($value == -1) {
      $settings[$key] = 0;
    }
    // Now compare the value to the defaults. Only store if an "override".
    if ($value == $defaults[$key]) {
      unset($settings[$key]);
    }
  }

  // Save the settings in a single array rather than individual keys
  if (!empty($settings)) {
    variable_set('facebooklikebox_settings', $settings);
  }

  // Remove all the old settings
  variable_del('facebooklikebox_pageurl');
  variable_del('facebooklikebox_height');
  variable_del('facebooklikebox_width');
  variable_del('facebooklikebox_bordercolor');
  variable_del('facebooklikebox_showfaces');
  variable_del('facebooklikebox_showstream');
  variable_del('facebooklikebox_showheader');
}
As I know Drupal web interface will always install modules to sites/all/modules.
Placing modules in subfolders like sites/all/modules/contrib, sites/all/modules/custom, or sites/all/modules/dev is a task for Drush and Drush Make; you can manually place the module in the right folder.

You can move your module folder with the PHP rename() function, or implement your own Updater instead of core ModuleUpdater. In your case, these solutions look improper.