Index: includes/class-wp-upgrader.php
===================================================================
--- includes/class-wp-upgrader.php	(revision 17848)
+++ includes/class-wp-upgrader.php	(working copy)
@@ -1313,6 +1313,15 @@
 		parent::__construct($args);
 	}
 
+	function header() {
+		if ( $this->done_header )
+			return;
+		$this->done_header = true;
+		echo '<div class="wrap">';
+		if ( !isset( $this->api->template ) ) echo screen_icon();
+		echo '<h2>' . $this->options['title'] . '</h2>';
+	}
+	
 	function before() {
 		if ( !empty($this->api) ) {
 			/* translators: 1: theme name, 2: version */
@@ -1337,8 +1346,8 @@
 		$install_actions = array(
 			'preview' => '<a href="' . $preview_link . '" class="thickbox thickbox-preview" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $name)) . '">' . __('Preview') . '</a>',
 			'activate' => '<a href="' . $activate_link .  '" class="activatelink" title="' . esc_attr( sprintf( __('Activate &#8220;%s&#8221;'), $name ) ) . '">' . __('Activate') . '</a>'
-							);
-
+			);
+			
 		if ( $this->type == 'web' )
 			$install_actions['themes_page'] = '<a href="' . self_admin_url('theme-install.php') . '" title="' . esc_attr__('Return to Theme Installer') . '" target="_parent">' . __('Return to Theme Installer') . '</a>';
 		else
@@ -1346,6 +1355,9 @@
 
 		if ( ! $this->result || is_wp_error($this->result) || is_network_admin() )
 			unset( $install_actions['activate'], $install_actions['preview'] );
+			
+	 	if ( isset($this->api->child) )
+	 		unset( $install_actions['activate'], $install_actions['preview'], $install_actions['themes_page'] );
 
 		$install_actions = apply_filters('install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info);
 		if ( ! empty($install_actions) )
Index: update.php
===================================================================
--- update.php	(revision 17848)
+++ update.php	(working copy)
@@ -208,6 +208,38 @@
 		$submenu_file = 'themes.php';
 		require_once(ABSPATH . 'wp-admin/admin-header.php');
 
+		if (isset($api->template) && !empty($api->template)) {
+
+			// look for the parent theme in the existing themes		
+			$found = false;
+			$themes = get_themes();
+			if ( ! $themes[$api->template] ) {
+				foreach ( $themes as $this_theme ) {
+					if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->template ) {
+						$found = true;
+						break;
+					}
+				}
+			}
+
+			// if we didn't find it, install it first			
+			if (!$found) {		
+				$child_api = $api;
+				$api = themes_api('theme_information', array('slug' => $api->template, 'fields' => array('sections' => false) ) ); //Save on a bit of bandwidth.
+				$api->child = $theme; // set the flag showing the installer that this is a parent theme install
+
+				$title = sprintf( __('Installing Parent Theme: %s'), $api->name . ' ' . $api->version );
+				$nonce = 'install-theme_' . $api->template;
+				$url = 'update.php?action=install-theme&theme=' . $api->template;
+				$type = 'web'; //Install theme type, From Web or an Upload.
+
+				$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
+				$upgrader->install($api->download_link);
+
+				$api=$child_api;
+			}
+		}
+
 		$title = sprintf( __('Installing Theme: %s'), $api->name . ' ' . $api->version );
 		$nonce = 'install-theme_' . $theme;
 		$url = 'update.php?action=install-theme&theme=' . $theme;
