Quantcast
Channel: Active questions tagged clonezilla - Super User
Viewing all articles
Browse latest Browse all 61

How to activate Windows during a massive OS deployment + machine testing?

$
0
0

I need to install Windows on 200 Lenovo ThinkPad T460 and 200 Lenovo ThinkPad T470 laptops, which will then be delivered to various countries in Africa. These PCs are used and require a check of their functionality.

I've already prepared an image using Clonezilla and used it to deploy to 20 PCs at a time using a switch connected to a Clonezilla Lite Server instance. I captured the image in audit mode so that I can easily test the keyboard, audio, WiFi, and various peripherals. After all the tests are done, I update the UEFI BIOS version and run Sysprep with the following command:

%windir%\System32\Sysprep\sysprep.exe /oobe /generalize /shutdown /unattend:unattend.xml

My unattended file looks like this:

<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"><settings pass="offlineServicing"></settings><settings pass="windowsPE"><component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"><SetupUILanguage><UILanguage>en-US</UILanguage></SetupUILanguage><InputLocale>0410:00000410</InputLocale><SystemLocale>en-GB</SystemLocale><UILanguage>en-US</UILanguage><UserLocale>en-GB</UserLocale></component><component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"><UserData><AcceptEula>true</AcceptEula></UserData><RunSynchronous><RunSynchronousCommand wcm:action="add"><Order>1</Order><Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Order>2</Order><Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Order>3</Order><Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassStorageCheck /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Order>4</Order><Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassCPUCheck /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Order>5</Order><Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Order>6</Order><Path>reg.exe add "HKLM\SYSTEM\Setup\LabConfig" /v BypassDiskCheck /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand></RunSynchronous></component></settings><settings pass="generalize"><component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><PersistAllDeviceInstalls>true</PersistAllDeviceInstalls></component><component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipRearm>1</SkipRearm></component></settings><settings pass="specialize"><component name="Microsoft-Windows-PnpSysprep" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><PersistAllDeviceInstalls>true</PersistAllDeviceInstalls></component><component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"><RunSynchronous><RunSynchronousCommand wcm:action="add"><Order>1</Order><Path>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v BypassNRO /t REG_DWORD /d 1 /f</Path></RunSynchronousCommand><RunSynchronousCommand wcm:action="add"><Order>2</Order><Path>net.exe accounts /maxpwage:UNLIMITED</Path></RunSynchronousCommand></RunSynchronous></component></settings><settings pass="auditSystem"></settings><settings pass="auditUser"></settings><settings pass="oobeSystem"><component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"><InputLocale>0410:00000410</InputLocale><SystemLocale>en-GB</SystemLocale><UILanguage>en-US</UILanguage><UserLocale>en-GB</UserLocale></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"><UserAccounts><LocalAccounts><LocalAccount wcm:action="add"><Name>***</Name><Group>Administrators</Group><Password><Value>***</Value><PlainText>true</PlainText></Password></LocalAccount></LocalAccounts></UserAccounts><AutoLogon><Username>***</Username><Enabled>true</Enabled><LogonCount>1</LogonCount><Password><Value>***</Value><PlainText>true</PlainText></Password></AutoLogon><OOBE><ProtectYourPC>3</ProtectYourPC><HideEULAPage>true</HideEULAPage><HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE></OOBE><FirstLogonCommands><SynchronousCommand wcm:action="add"><Order>1</Order><CommandLine>reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 0 /f</CommandLine></SynchronousCommand></FirstLogonCommands></component></settings></unattend>

I'm facing a doubt: since these PCs won't be connected to the internet, how can I keep them activated after the Sysprep generalize step?

I have already made some attempts, and after the reboot and login with the default admin user, Windows settings indicate that it is not activated.


Viewing all articles
Browse latest Browse all 61

Trending Articles