[Libosinfo] [PATCHv2 3/4] win7,installer: Adapt for Windows 8

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Thu Feb 28 01:37:45 UTC 2013


From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>

Win8 seems to require Microsoft-Windows-Setup/UserData/ProductKey/Key to
be set, which seems to be exclusive with using
Microsoft-Windows-Setup/ImageInstall/OSImage/InstallFrom/MetaData (or at
least some care needs to be taken when using both together). As letting
the Windows installer decide on which OSImage to use from the product key
rather than hardcoding use of the first OSImage on the ISO seems more
robust, we switch from InstallFrom installation image selection to
ProductKey installation image selection.

Also, there are 2 different locations where you can put it with different
purposes, the one at Microsoft-Windows-Setup/UserData/ProductKey/Key is
used for installation image selection (ie as a /IMAGE/INDEX replacement).
The ProductKey that was set for Win7 is used for Windows activation
(which you have to do within 30 days of installation), so we should set
it as well in all cases if this does not break win8 unattended.

Co-author: Christophe Fergeau <cfergeau at redhat.com>
---
 data/install-scripts/windows-unattend.xml | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/data/install-scripts/windows-unattend.xml b/data/install-scripts/windows-unattend.xml
index 743d918..7e97b56 100644
--- a/data/install-scripts/windows-unattend.xml
+++ b/data/install-scripts/windows-unattend.xml
@@ -112,12 +112,6 @@
 		</DiskConfiguration>
 		<ImageInstall>
 		  <OSImage>
-		    <InstallFrom>
-		      <MetaData wcm:action="add">
-			<Key>/IMAGE/INDEX</Key>
-			<Value>1</Value>
-		      </MetaData>
-		    </InstallFrom>
 		    <InstallTo>
 		      <DiskID>0</DiskID>
 		      <PartitionID>1</PartitionID>
@@ -127,6 +121,9 @@
 		</ImageInstall>
 		<UserData>
 		  <AcceptEula>true</AcceptEula>
+                    <ProductKey>
+                      <Key><xsl:value-of select="config/reg-product-key"/></Key>
+                    </ProductKey>
 		</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">
@@ -331,12 +328,6 @@
          </DiskConfiguration>
          <ImageInstall>
           <OSImage>
-           <InstallFrom>
-            <MetaData wcm:action="add">
-             <Key>/IMAGE/INDEX</Key>
-             <Value>1</Value>
-            </MetaData>
-           </InstallFrom>
            <InstallTo>
             <DiskID>0</DiskID>
             <PartitionID>1</PartitionID>
@@ -346,6 +337,9 @@
          </ImageInstall>
          <UserData>
           <AcceptEula>true</AcceptEula>
+           <ProductKey>
+            <Key><xsl:value-of select="config/reg-product-key"/></Key>
+           </ProductKey>
          </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">
-- 
1.8.1.2




More information about the Libosinfo mailing list