I've noticed that when installing Windows 8.1 the activation is not done
by the end of the unattended installation and, actually, the serial
number shown in the Activate Windows program is different than the one
used to perform the installation. Also, when tring to activate the
software it fails with the "Windows can't be activate. Try again later"
message and no useful details about the error.

So, in order to avoid this issue, let's force the activation in the
FirstLogon phase of the installation script.

Signed-off-by: Fabiano Fidêncio <[email protected]>
---
 data/install-script/microsoft.com/windows-unattend-desktop.xml.in | 7 +++++++
 1 file changed, 7 insertions(+)

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 3ebbff7..e96a37a 100644
--- a/data/install-script/microsoft.com/windows-unattend-desktop.xml.in
+++ b/data/install-script/microsoft.com/windows-unattend-desktop.xml.in
@@ -251,6 +251,13 @@
             <Description>Turn Off Network Selection pop-up</Description>
             <CommandLine>cmd /c reg add 
"HKLM\SYSTEM\CurrentControlSet\Control\Network\NewNetworkWindowOff"</CommandLine>
            </SynchronousCommand>
+           <xsl:if test="os/version = 6.3">
+            <SynchronousCommand wcm:action="add">
+             <Order>2</Order>
+             <Description>Force windows activation</Description>
+             <CommandLine>cmd /c cscript.exe slmgr.vbs /ipk <xsl:value-of 
select="config/reg-product-key"/> /atoi</CommandLine>
+            </SynchronousCommand>
+           </xsl:if>
           </FirstLogonCommands>
          </xsl:if>
         </component>
-- 
2.7.3

_______________________________________________
Libosinfo mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libosinfo

Reply via email to