[Libosinfo] [PATCH 09/10] win, installer: Improve "setting product key" logic

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Thu May 5 18:14:53 UTC 2016


Hi,

On Thu, May 5, 2016 at 11:55 AM, Fabiano Fidêncio <fidencio at redhat.com> wrote:
> Only a few variants of Windows 8 and Windows 8.1, like Enterprise,
> Enterprise Debug and Professioanl, have to have the ProductKey skipped
> during the WindowsPE phase of the installation script.

Professional spelled incorrectly.

> This patch re-writes the "skipping ProductKey" logic in a cleaner way
> (that will also work for Windows 10).

I would think making it work for Windows 10 would be a more noteworthy
benefit to be just put in brackets. :)

> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
>  .../microsoft.com/windows-unattend-desktop.xml.in   | 21 +++++++++++++--------
>  1 file changed, 13 insertions(+), 8 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 a207c1d..3d58a88 100644
> --- a/data/install-script/microsoft.com/windows-unattend-desktop.xml.in
> +++ b/data/install-script/microsoft.com/windows-unattend-desktop.xml.in
> @@ -150,17 +150,22 @@
>           <UserData>
>            <AcceptEula>true</AcceptEula>
>            <xsl:choose>
> -            <xsl:when test="os/version < 6.2"> <!-- Windows 7 and older -->
> +            <xsl:when test="os/version = 6.2 or os/version = 6.3"> <!-- Windwos 8 and Windows 8.1 -->
> +              <xsl:choose>
> +                <xsl:when test="count(media/variant != 0) and (contains(media/variant, 'enterprise') or contains(media/variant, 'professional'))">
> +                  <!-- Skip the ProductKey during this phase of the script for the following variants: Enterprise, Enterprise Debug and Professional -->
> +                </xsl:when>
> +                <xsl:otherwise>
> +                  <ProductKey>
> +                    <Key><xsl:value-of select="config/reg-product-key"/></Key>
> +                  </ProductKey>
> +                </xsl:otherwise>
> +              </xsl:choose>
> +            </xsl:when>
> +            <xsl:otherwise>
>                <ProductKey>
>                  <Key><xsl:value-of select="config/reg-product-key"/></Key>
>                </ProductKey>
> -            </xsl:when>
> -            <xsl:otherwise> <!-- Windows 8 and 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>
> --
> 2.7.4
>
> _______________________________________________
> Libosinfo mailing list
> Libosinfo at redhat.com
> https://www.redhat.com/mailman/listinfo/libosinfo



-- 
Regards,

Zeeshan Ali (Khattak)




More information about the Libosinfo mailing list