--- module_installer.module.old	2007-02-16 09:31:13.000000000 -0800
+++ module_installer.module	2007-02-16 10:31:11.000000000 -0800
@@ -60,10 +60,31 @@ function module_installer_install() {
 }
 
 function module_installer_install_form() {
-  $form['url'] = array(
-     '#type' => 'textfield',
-     '#title' => t('URL of tar.gz module package'),
-  );
+  if ($_GET['url'] != '') { 
+    $url = $_GET['url']; 
+    $form['url'] = array(
+       '#type' => 'textfield',
+       '#title' => t('URL of tar.gz module package'),
+       '#default_value' => $url,
+    );
+  } else { 
+    $form['url'] = array(
+       '#type' => 'textfield',
+       '#title' => t('URL of tar.gz module package'),
+    );
+  }
+
+  if ($_GET['dest'] != '' ) { 
+    $dest = $_GET['dest']; 
+    $form['dest'] = array(
+       '#type' => 'textfield',
+       '#title' => t('Destination to which module should be installed'),
+       '#default_value' => $dest,
+    );
+  }
+
+  if ($_GET['dest'] != '' ) { 
+  }
 
   $form['submit'] = array(
      '#type' => 'submit',
@@ -75,7 +96,12 @@ function module_installer_install_form()
 
 function module_installer_install_form_submit($form_id, $form_values) {
   $destination_path = variable_get('module_installer_path_download', 'files');
-  $modules_dir =  variable_get('module_installer_path_install', 'modules/contrib');
+  if ( $form_values['dest'] != '') {
+    $modules_dir = $form_values['dest'];
+  } else {
+    $modules_dir = variable_get('module_installer_path_install', 'sites/all/modules');
+  }
+
   $basename = basename($form_values['url']);
 
   $exec_cmd = "wget -P" . $destination_path . " " . $form_values['url'];
