--- C:/ProgramData/Propeople/Drush/commands/core/archive.drush.inc.orig	Thu Sep 29 04:42:34 2011
+++ C:/ProgramData/Propeople/Drush/commands/core/archive.drush.inc	Thu Sep 29 19:45:49 2011
@@ -61,6 +61,7 @@
  * Command callback. Generate site archive file.
  */
 function drush_archive_dump($sites_subdirs = '@self') {
+  $tar = drush_is_windows() ? "bsdtar" : "tar";
   $full = array();
   $aliases = drush_sitealias_resolve_sitespecs(explode(',', $sites_subdirs));
   foreach ($aliases as $key => $alias) {
@@ -162,9 +163,9 @@
   $docroot = basename($docroot_path);
   $workdir = dirname($docroot_path);
   // Archive Drupal core, excluding sites dir.
-  drush_shell_cd_and_exec($workdir, "tar --exclude '{$docroot}/sites' --dereference -cf %s %s", $destination, $docroot);
+  drush_shell_cd_and_exec($workdir, "$tar --exclude \"{$docroot}/sites\" --dereference -cf %s %s", $destination, $docroot);
   // Add sites/all to the same archive.
-  drush_shell_cd_and_exec($workdir, "tar --dereference -rf %s %s", $destination, "{$docroot}/sites/all");
+  drush_shell_cd_and_exec($workdir, "$tar --dereference -rf %s %s", $destination, "{$docroot}/sites/all");
 
   $tmp = drush_tempdir();
   // Dump the database(s) for each site and add to the archive.
@@ -176,7 +177,7 @@
       $table_selection = drush_sql_get_table_selection();
       list($dump_exec, $dump_file) = drush_sql_build_dump_command($table_selection, $target['default'], $result_file);
       drush_shell_exec($dump_exec);
-      drush_shell_cd_and_exec($tmp, 'tar --dereference -rf %s %s', $destination, basename($result_file));
+      drush_shell_cd_and_exec($tmp, "$tar --dereference -rf %s %s", $destination, basename($result_file));
     }
   }
 
@@ -197,7 +198,7 @@
 
     // Add the site specific directory to archive.
     if (!empty($status['object']['%paths']['%site'])) {
-      drush_shell_cd_and_exec($workdir, "tar --dereference -rf %s %s", $destination,  "{$docroot}/sites/" . basename($status['object']['%paths']['%site']));
+      drush_shell_cd_and_exec($workdir, "$tar --dereference -rf %s %s", $destination,  "{$docroot}/sites/" . basename($status['object']['%paths']['%site']));
     }
 
     $site = array(
@@ -221,7 +222,7 @@
   file_put_contents("{$tmp}/MANIFEST.ini", $contents);
 
   // Add manifest to archive.
-  drush_shell_cd_and_exec($tmp, 'tar --dereference -rf %s %s', $destination, "MANIFEST.ini");
+  drush_shell_cd_and_exec($tmp, "$tar --dereference -rf %s %s", $destination, "MANIFEST.ini");
 
   // Compress the archive
   drush_shell_exec("gzip --no-name -f %s", $destination);
