[Libosinfo] [PATCH v5 10/14] win8.1, installer: Tune based on variants

Fabiano Fidêncio fidencio at redhat.com
Tue May 3 18:05:11 UTC 2016


From: Fabiano Fidêncio <fabiano at fidencio.org>

So, I ended up doing tests with all ISOs that I have access from MSDN
and here is the conclusion:

Windows 8.1
 Problematic:
  en_windows_8_1_enterprise_debug_checked_x64_dvd_2756358.iso
  en_windows_8_1_enterprise_n_debug_checked_x64_dvd_2942525.iso
  en_windows_8_1_enterprise_n_x64_dvd_2971845.iso
  en_windows_8_1_enterprise_x64_dvd_2971902.iso
  en_windows_8_1_pro_n_vl_x64_dvd_2971969.iso

 Non-problematic:
  en_windows_8_1_n_debug_checked_x64_dvd_2707894.iso
  en_windows_8_1_debug_checked_x64_dvd_2707208.iso
  en_windows_8_1_n_x64_dvd_2707896.iso

Windows 8.1 with Updates:
 Problematic:
  en_windows_8.1_enterprise_n_with_update_x64_dvd_6050225.iso
  en_windows_8.1_enterprise_with_update_x64_dvd_6054382.iso
  en_windows_8.1_pro_n_vl_with_update_x64_dvd_6050969.iso
  en_windows_8.1_pro_vl_with_update_x64_dvd_6050880.iso

 Non-problematic:
  en_windows_8.1_n_with_update_x64_dvd_6051677.iso
  en_windows_8.1_with_update_x64_dvd_6051480.iso

Based on this info, the best way to go is:
- Set the ProductKey during the WindowsPE phase of the setup only in the
  following conditions:
  - any Windows media that is not Windows 8.1 (as it was before)
  - Windows 8.1 media has no variant
  - Windows 8.1 media contains on its variant debug but doesn't contain
    enterprise on it

  These rules will cover medias with no variant and with "debug" variant
  that are not enterprise. All the rest (Enterprise, Enterprise Debug
  and Professional) will have the ProductKey skipped during the
  WindowsPE phase of the setup.

Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
---
 .../microsoft.com/windows-unattend-desktop.xml.in      | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/data/install-script/microsoft.com/windows-unattend-desktop.xml.in b/data/install-script/microsoft.com/windows-unattend-desktop.xml.in
index e31df1f..78cba52 100644
--- a/data/install-script/microsoft.com/windows-unattend-desktop.xml.in
+++ b/data/install-script/microsoft.com/windows-unattend-desktop.xml.in
@@ -149,9 +149,20 @@
          </ImageInstall>
          <UserData>
           <AcceptEula>true</AcceptEula>
-           <ProductKey>
-            <Key><xsl:value-of select="config/reg-product-key"/></Key>
-           </ProductKey>
+          <xsl:choose>
+            <xsl:when test="os/version != 6.3"> <!-- Any Windows, but the Windows 8.1 -->
+              <ProductKey>
+                <Key><xsl:value-of select="config/reg-product-key"/></Key>
+              </ProductKey>
+            </xsl:when>
+            <xsl:otherwise> <!-- Windows 8.1 -->
+              <xsl:if test="count(media/variant) = 0 or (contains(media/variant, 'debug') and not(contains(media/variant, 'enterprise')))"> <!-- "No Variant" or "Debug" variant -->
+                <ProductKey>
+                  <Key><xsl:value-of select="config/reg-product-key"/></Key>
+                </ProductKey>
+              </xsl:if>
+            </xsl:otherwise>
+          </xsl:choose>
          </UserData>
         </component>
         <component name="Microsoft-Windows-International-Core-WinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
@@ -249,7 +260,6 @@
          <xsl:attribute name="processorArchitecture">
           <xsl:call-template name="arch"/>
          </xsl:attribute>
-
          <ProductKey><xsl:value-of select="config/reg-product-key"/></ProductKey>
         </component>
        </settings>
-- 
2.7.3




More information about the Libosinfo mailing list