DevOps Cloud (ADM)
Cybersecurity
IT Operations Cloud
Downloads required:
Windows Driver Kit Version 7.1.0 (to get access to DPINST.exe utility)
x86_Microsoft-Windows-LUA-Settings_neutral | 2 offline Servicing |
x86_Microsoft-Windows-Security-SPP_neutral | 3 generalize |
x86_Microsoft-Windows-Deployment_neutral | 4 specialize |
x86_Microsoft-Windows-Security-SPP_UX_neutral | 4 specialize |
x86_Microsoft-Windows-Shell-Setup_neutral | 4 specialize |
x86_Microsoft-Windows-International-Core_neutral | 7 oobeSystem |
x86_Microsoft-Windows-Shell-Setup_neutral | 7 oobeSystem |
We now need to go through each section and change some settings.
In the Answer file Section, do the following:
Section |
Setting Name |
Value |
Reason |
2 offline Servicing x86_Microsoft-Windows-LUA-Settings_neutral | EnableLUA | False | Disables User Access Control |
3 generalize x86_Microsoft-Windows-Security-SPP_neutral | SkipRearm | 1 | Licensing |
4 specialize x86_Microsoft-Windows-Deployment_neutral | RunSynchronous | Add a new command Order 1 Net user administrator /active:yes | Active the local administrator account |
4 specialize x86_Microsoft-Windows-Security-SPP-UX_neutral | SkipAutoActivation | True |
4 specialize x86_Microsoft-Windows-Shell-Setup_neutral | ComputerName | * | Generates a random Computer name. My script later on picks up BIOS name and sets computer name |
CopyProfile | True |
ProductKey | xxxxx-xxxxx-xxxxx-xxxxx-xxxxx | Valid Product Key |
RegisteredOrganization | Leave as Microsoft |
RegisteredOwner | Leave as AutoBVT |
ShowWindowsLive | False |
TimeZone | GMT Standard Time | Set as appropriate for your region |
7 oobeSystem X86_Microsoft-Windows-International-Core_neutral |
InputLocale SystemLocale UILanguage UserLocale |
en-GB |
Set as appropriate for your region |
7 oobeSystem x86_Microsoft-Windows-Shell-Setup_neutral | RegisteredOrganization | xxxxxxxxxxxxxxxxxxxx | Your Company Name |
RegisteredOwner | xxxxxxxxxxxxxxxxxxxx | Your Company Name |
TimeZone | GMT Standard Time | Set as appropriate for your region |
Subsection AutoLogon | Enabled | True |
LogonCount | 3 | Do 3 auto logons before leaving user at login screen (to cater for automated scripts and reboots) |
Username | administrator |
Password | Pa55word | Set as appropriate - make sure it matches up with other sections in this guide |
Subsection FirstLogonCommands | CommandLine Order 1 RequiresUserInput false | cscript //b C:\windows\system32\slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx |
CommandLine Order 2 RequiresUserInput false | %SystemRoot%\ system32\ WindowsPowerShell\ v1.0\powershell.exe -Command "&{set-executionpolicy RemoteSigned -Force}" | Enables Powershell Scripts |
CommandLine Order 3 RequiresUserInput false | %SystemRoot%\ system32\ WindowsPowerShell\ v1.0\powershell.exe "c:\setup\Win7Image-Script1.ps1" |
Subsection OOBE | HideEULAPage | True |
NetworkLocation | Work |
ProtectYourPC | 1 |
Subsection UserAccounts | AdministratorPassword | Pa55word |
LocalAccounts Add record for user administrator | Description: administrator DisplayName: administrator Group: administrators Name: administrator Password Pa55word |
Save the unattend.xml answer file
Additional addon-images were created following instructions located here as follows:
Win7-Addon-Drivers.zmg | Contains the driver files for any unknown devices – creates a folder on C: called C:\SETUP\DRIVERS Contains 32 and 64 bit drivers |
Win7-Addon-Scripts.zmg | Contains the relevant Powershell Scripts and any utilities that are required as part of the imaging process. Files are stored under C:\SETUP Current Files are: BiosConfigUtility.exe - HP Utility to read BIOS settings - use to rename computer Win7Image-Script1.ps1 Win7Image-Script2.ps1 Win7Image-Script3.ps1 dpinst.exe, dpinst64.exe, dpinst.xml - used to do a hardware scan for any unknown devices |
Win7-32-Addon-ZCMAgent.zmg (or Win7-64-Addon-ZCMAgent.zmg) | Latest ZCM agent copied to C:\SETUP. The Scripts above call this to register the machine in ZCM. Since agent name is always the same, this can be replaced with the latest agent whenever required. |
The important thing to make sure when creating these is to make sure that the partition number on the image matches the partition number inside the Windows 7 ZMG file for the boot disk – as a default this is partition 2 as partition 1 is the 100MB hidden area for Windows 7.
The imaging bundle applies the relevant base image (32 or 64 bit), followed by these addon images.
i.e. ZCM Windows Bundle has the following 4 images listed as part of the image
Windows_7_Base_Image.zmg
Win7-Addon-Drivers.zmg
Win7-Addon-Scripts.zmg
Win7-32-Addon-ZCMAgent.zmg
One final step to take is to delete the C:\SETUP folder to remove any files that may contain passwords etc.