Gói mở rộng bộ cài đặt Windows

<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-International-Core-WinPE" 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">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>Administrator</FullName>
<Organization>Blog Windows 10</Organization>
<ProductKey>
<Key>W269N-WFGWX-YVC9B-4J6C9-T83GX</Key>
</ProductKey>
</UserData>
<EnableFirewall>true</EnableFirewall>
</component>
<component name="Microsoft-Windows-Setup" 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">
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>Administrator</FullName>
<Organization>Blog Windows 10</Organization>
<ProductKey>
<Key>W269N-WFGWX-YVC9B-4J6C9-T83GX</Key>
</ProductKey>
</UserData>
<EnableFirewall>true</EnableFirewall>
</component>
</settings>
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<EnableLUA>true</EnableLUA>
</component>
</settings>
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" 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">
<EnableLUA>true</EnableLUA>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="x86" 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="generalize">
<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-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-International-Core" 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">
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" 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">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-SQMApi" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CEIPEnabled>0</CEIPEnabled>
</component>
<component name="Microsoft-Windows-SQMApi" 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">
<CEIPEnabled>0</CEIPEnabled>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>PC</ComputerName>
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<ComputerName>PC</ComputerName>
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Description></Description>
<DisplayName>Administrator</DisplayName>
<Group>Administrators</Group>
<Name>Administrator</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOrganization>Blog Windows 10</RegisteredOrganization>
<RegisteredOwner>Administrator</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<TimeZone>SE Asia Standard Time</TimeZone>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Description></Description>
<DisplayName>Administrator</DisplayName>
<Group>Administrators</Group>
<Name>Administrator</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOrganization>Blog Windows 10</RegisteredOrganization>
<RegisteredOwner>Administrator</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<TimeZone>SE Asia Standard Time</TimeZone>
</component>
</settings>
</unattend>
Tập tin này sẽ sử dụng chung cho cả 2 nền tảng Windows 10 32 bit và Windows 10 64 bit. Thay các dòng in đậm theo ý của bạn, với product key nên sử dụng kms key

Windows 10 Professional
W269N-WFGWX-YVC9B-4J6C9-T83GX
Windows 10 Professional N
MH37W-N47XK-V7XM9-C7227-GCQG9
Windows 10 Enterprise
NPPR9-FWDCX-D2C8J-H872K-2YT43
Windows 10 Enterprise N
DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
Windows 10 Education
NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
Windows 10 Education N
2WH4N-8QGBV-H22JP-CT43Q-MDWWJ
Windows 10 Enterprise 2015 LTSB
WNMTR-4C88C-JK8YV-HQ7T2-76DF9
Windows 10 Enterprise 2015 LTSB N
2F77B-TNFGY-69QQF-B8YKP-D69TJ
Windows 10 Enterprise 2016 LTSB
DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ
Windows 10 Enterprise 2016 LTSB N
QFFDN-GRT3P-VKWWX-X7T3R-8B639

Với múi giờ ở trên SE Asia Standard Time là GMT+7 nếu sử dụng múi giờ Mỹ là Pacific Standard Time. Xem thêm các múi giờ tại các khu vực khác tại đây.

Phần quan trọng nhất trong tập tin này bạn phải để tài khoản là Administrator mới có thể rebuild được

Mẹo: Bạn nên cài đặt phần mềm soạn thảo notepad++ sử dụng sẽ thấy các dòng trong các đoạn mã nó có màu đen dễ nhìn và dễ chỉnh sửa

Gói mở rộng bộ cài đặt Windows

Như vậy bạn đã có một chiếc usb cài đặt Windows 10 tự động. Ở phần tiếp theo sẽ triển khai cài đặt lên máy ảo vmware bằng chiếc usb này.

Phần 2: Triển khai bộ cài lên máy ảo vmware.

Tiếp theo bạn cần cài đặt máy ảo vmware player hoặc vmware workstation và cài đặt Windows 10 trên máy ảo. Tham khảo bài viết này để biết cách cấu hình

Lưu ý khi cấu hình phần CD/DVD bạn gắn file iso vmware boot vào máy ảo nhé và phần USB thì để 2.0 thôi cài bản 64 bit trên UEFI Boot nó mới nhật usb 3.0 và khi cắm usb cài đặt thì cắm vào cổng 2.0 nó mới nhận.

Khi đã cấu hình xong khởi chạy máy ảo bắt đầu cài đặt, giao diện khi mới boot vào máy ảo trông nó như thế này

Bạn làm theo như hình bên dưới để kết nối usb vào máy ảo

Khi kết nối usb thành công tại màn hình máy ảo bấm phím mũi tên lên xuống chọn usb và nhấn enter

Máy ảo sẽ bắt đầu cài đặt Windows 10

Nhấn Next tại màn hình này

Màn hình tiếp theo bấm New>Apply bấm Ok xác nhận.

Nhấp chuột chọn Partition 1: System Reserved bấm chọn Delete bấm Ok xác nhận

Nhấp chuột chọn Partition 2 bấm Next bắt đầu cài đặt. Khi đến màn hình dưới windows sẽ cài đặt tự động cho đến khi boot vào desktop dựa trên tập tin cấu hình autounattend.xml trong usb lưu ý giữ usb tuyệt đối không được rút ra đột ngột nhé không thì công toi phải cài lại mất công.

Và khi vào đến desktop

Trong phần tiếp theo chúng ta sẽ triển khai cài đặt phần mềm, ứng dụng văn phòng, tùy chỉnh, cá nhân hóa...

Phần 3: Cài đặt phần mềm, ứng dụng văn phòng, tùy chỉnh, cá nhân hóa...

Trong phần này chúng ta sẽ triển khai cài đặt phần mềm, ứng dụng văn phòng, tùy chỉnh, cá nhân hóa... trên Windows 10

1. Cài đặt phần mềm

Để cài đặt phần mềm bạn ngắt kết nối usb từ máy ảo sau đó tạo một thư mục softwares chẳng hạn trong usb và di chuyển các phần mềm cần thiết vào thư mục đó. Di chuyển xong thì kết nối usb với máy ảo trở lại.

Khi cài đặt phần mềm bạn nên dẫn lối tắt của phần mềm ra desktop

2. Cài đặt Microsoft Office

Để cài đặt Microsoft Office trên tab VM của máy ảo bấm chọn Settings hoặc bấm phím tắt Ctrl+D gắn iso của bộ cài đặt office thay thế cho file iso vmware boot sau đó bấm Ok. Khi cài đặt Microsoft Office bạn nên dẫn lối tắt của các ứng dụng Excel, Word ra desktop.

3. Kích hoạt Net Framework 3.5

Trên Windows 8 và các phiên bản Windows trở về sau sử dụng Net Framework 4.5 (Windows 8/8.1) và Net Framework 4.6.2 với Windows 10. Đây được gọi là tính năng Feature tuy nhiên tính năng Net Framework 2.0-3.5 mặc định bị tắt đi mà một số phần mềm cũ như driver máy in cũ chẳng hạn yêu cầu phải có tính năng này mới cài đặt được. Do vậy để bật tính năng này chúng ta sẽ sử dụng dòng lệnh trong Cmd

Dism /online /enable-feature /featurename:NetFX3 /All /Source😁:\sources\sxs /LimitAccess

Tróng đó D:\sources\sxs là đường dẫn đến thư mục sxs trong thư mục nguồn sources của usb cài đặt Windows 10 khi bạn gắn vào máy ảo

4. Tùy chỉnh hệ thống

Phần tinh chỉnh hệ thống tùy theo kinh nghiệm và kiến thức của mỗi người mà có sự tùy chỉnh khác nhau tuy nhiên nếu bạn tắt dịch vụ services thì không được tắt các dịch vụ liên quan đến mạng, và cũng không nên tắt tường lửa hay windows update vì sẽ không chạy hay cập nhật được ứng dụng Mentro UI trên Windows 10. Những việc bạn có thể làm như

Tùy chỉnh trong ứng dụng Settings

Các bạn tham khảo bài viết này để biết cách tùy chỉnh

Tùy chỉnh File Explorer như đặt kiểu This Pc thay cho Quick Access, kiểu view larger, remove 6 thư mục mở rộng desktop, pictures...

Tắt hoặc bật tính năng mặc định chỉ cần tích hoặc bỏ tích vào ô vuông bấm Apply

Tắt thông báo User Control Settings lưu ý bạn không được tắt nó mà chỉ tắt thông báo thôi nếu bạn tắt UAC sẽ không chạy được ứng dụng Metro UI

Thêm một số tùy chỉnh trong Reistry Editor

Các bạn xem thêm bài viết này để down các reg file được tạo sẵn

Tắt dịch vụ chạy ngầm

Bạn vào Services kiểm tra các dịch vụ Running bạn có thể tắt và disable nhưng yêu cầu bạn phải nắm chắc kiến thức vì nếu tắt không đúng cách có thể gây lỗi cả hệ thống, tốt nhất bạn cứ để nó mặc định vì nó cũng không ảnh hưởng gì mấy.

Kích hoạt UAC-For-Built-in cho tài khoản Administrator nếu muốn sử dụng tài khoản này mở được ứng dụng Metro UI

Ngoài ra bạn có thể sử dụng phần mềm winaero tweaker thêm một số tùy chỉnh cho đơn giản ví dụ như tắt mũi tên shorcut ngoài desktop chẳng hạn.

Phần mềm này rất hay, giao diện đơn giản dễ hiểu dễ thực hiện.

5. Cá nhân hóa

Cá nhân hóa là việc chúng ta thêm một chút màu sắc, thêm thông tin của chúng ta, hay thay đổi các giao diện theme mặc định Windows 10

Để tạo một gói theme đơn giản bạn chỉ cần truy cập đường dẫn C:\Windows\Web\Wallapaper tạo mới một thư mục đặt tên cho nó rồi kiếm những bức ảnh đẹp copy nó vào thư mục đó. Song mở Settings đi đến Personalization=>Picture bên phải phần Backgroud nhấp chuột chọn Slideshow

Tiếp tục bấm Browse tìm đến thư mục lưu ảnh chọn cả thư mục

Chuyển đến Themes chọn Theme settings

Chuột phải cho gói theme chọn save theme và đặt cho nó một cái tên

Thêm thông tin tác giả vào hộp thoại System Properties

Chuẩn bị sẵn một logo có kích thước tối đa 120x120 định dạng ảnh là bmp và đặt tên là oemlogo sau đó copy logo này vào đường dẫn C:\Windows\System32\oobe

Mở trình soạn thảo noteapd lên copy đoạn mẫu bên dưới vào sau đó lưu lại với tên ví dụ oeminformation.reg định dạng All Files

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation]
"Manufacturer"=-
"Model"=- "Logo"="\\windows\\system32\\oobe\\oemlogo.bmp"
"SupportPhone"=-
"SupportURL"=-
"SupportHours"=-

Thay các dấu (-) bằng thông tin bạn muốn thêm ví dụ "Manufacturer"="Blog Windows 10"

Ngoài ra bạn có thể cài đặt các gói giao diện khác hay thay đổi icon hệ thống đều được tùy vào sở thích của mỗi người khi làm.

Đặt trình duyệt mặc định thêm các tab yêu thích vào thanh dấu trang hoặc thay đổi giao diện cho trình duyệt nhưng lưu ý không cài tiện ích vì nếu cài khi setup lại cũng mất tiện ích.

Phần 4: Chạy công cụ sysprep kết hợp với tập tin xml trả lời tự động tùy chỉnh.

Công cụ mặc định sysprep.exe của Windows có tác dụng xóa hết driver, xóa thư mục update SoftwareDistribution trong đường dẫn C:\Windows, xóa tài khoản cũ, xóa hết các tùy chỉnh thiết lập của người dùng, công cụ này được đặt trong thư mục Sysprep theo đường dẫn C:\Windows\System32. Công cụ Sysprep.exe chỉ chạy được trên tài khoản quản trị Administrator. Nếu bạn muốn giữ lại các thiết lập cá nhân ví dụ các lối tắt ngoài desktop, cá nhân hóa bạn phải tạo một tập tin unattend.xml và đưa tập tin này nằm cùng với thư mục của phần mềm sysprep.exe.

Hướng dẫn tạo tập tin unattend.xml

Cách tạo tập tin unattend.xml cũng giống như bạn tạo tập tin autounattend.xml cài đặt tự động vậy. Mở trình soạn thảo notepad ra copy code bên dưới vào sau đó lưu lại với tên unattend.xml định dạng All Files và Encoding là UTF-8. Bạn có thể tạo một tập tin chung sử dụng cho cả 2 nền tảng 32 bit và 64 bit

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="offlineServicing">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>true</CopyProfile>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<CopyProfile>true</CopyProfile>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<FolderLocations>
<ProfilesDirectory>C:\Users</ProfilesDirectory>
</FolderLocations>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<FolderLocations>
<ProfilesDirectory>C:\Users</ProfilesDirectory>
</FolderLocations>
</component>
</settings>
</unattend>

Có nghĩa khi bạn tạo tập tin unattend.xml với nội dung như trên khi kết hợp chạy với phần mềm sysprep.exe hệ thống sẽ hiểu bạn muốn chuyển những tùy chỉnh cài đặt của tài khoản người dùng trước cụ thể là tài khoản Administrator sang người dùng mới sau khi setup lại. Trong thư mục Users tại ổ C luôn có một thư mục tài khoản ẩn Default thư mục này lưu tất cả các cài đặt của người dùng cũ và khi bạn muốn chuyển qua tài khoản người dùng mới bạn phải sao chép từ tài khoản ẩn default này sang tài khoản người dùng mới.

Lưu ý: Tập tin unattend.xml ở trên sẽ không trả lời setup tự động được nếu bạn muốn nó setup tự động sau khi chọn phân vùng cài đặt bạn phải thêm vào những giá trị như dưới. Viết đầy đủ

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<EnableLUA>true</EnableLUA>
</component>
</settings>
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" 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">
<EnableLUA>true</EnableLUA>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="x86" 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="generalize">
<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-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-International-Core" 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">
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-Security-SPP-UX" 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">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-SQMApi" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CEIPEnabled>0</CEIPEnabled>
</component>
<component name="Microsoft-Windows-SQMApi" 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">
<CEIPEnabled>0</CEIPEnabled>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>true</CopyProfile>
<ComputerName>PC</ComputerName>
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<CopyProfile>true</CopyProfile>
<ComputerName>PC</ComputerName>
<ProductKey>W269N-WFGWX-YVC9B-4J6C9-T83GX</ProductKey>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Description></Description>
<DisplayName>Administrator</DisplayName>
<Group>Administrators</Group>
<Name>Administrator</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOrganization>Blog Windows 10</RegisteredOrganization>
<RegisteredOwner>Administrator</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<TimeZone>SE Asia Standard Time</TimeZone>
<TaskbarLinks>
<Link0></Link0>
<Link1></Link1>
<Link2></Link2>
<Link3></Link3>
</TaskbarLinks>
<FolderLocations>
<ProfilesDirectory>C:\Users</ProfilesDirectory>
</FolderLocations>
</component>
<component name="Microsoft-Windows-Shell-Setup" 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">
<AutoLogon>
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
<Username>Administrator</Username>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<NetworkLocation>Work</NetworkLocation>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
<ProtectYourPC>1</ProtectYourPC>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value></Value>
<PlainText>true</PlainText>
</Password>
<Description></Description>
<DisplayName>Administrator</DisplayName>
<Group>Administrators</Group>
<Name>Administrator</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<RegisteredOrganization>Blog Windows 10</RegisteredOrganization>
<RegisteredOwner>Administrator</RegisteredOwner>
<DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
<TimeZone>SE Asia Standard Time</TimeZone>
<TaskbarLinks>
<Link0></Link0>
<Link1></Link1>
<Link2></Link2>
<Link3></Link3>
</TaskbarLinks>
<FolderLocations>
<ProfilesDirectory>C:\Users</ProfilesDirectory>
</FolderLocations>
</component>
</settings>
</unattend>

Thay các giá trị in đậm theo ý của bạn. Khi tạo xong tập tin unattend.xml bạn copy nó vào thư mục Sysprep trong đường dẫn C:\Windows\System32\Sysprep



Hướng dẫn giữ lại các ứng dụng đã ghim vào Start Menu sau khi chạy sysprep

Để giữ lại các ứng dụng đã ghim vào Start Menu sau khi chạy sysprep chúng ta phải tạo ra một tập tin có tên layoutmodification.xml bên cạnh tập tin DefaultLayouts.xml và tập tin này được đặt trong thư mục Shell theo đường dẫn sau:

C:\Users\Default\AppData\Local\Microsoft\Windows\Shell

Để tạo tập tin này chúng ta sử dụng lệnh trong powershell, khởi chạy powershell rồi copy lệnh bên dưới vào powershell nhấn enter là xong.

export-startlayout -path C:\Users\Default\AppData\Local\Microsoft\Windows\Shell\layoutmodification.xml

Kiểm tra tập tin layoutmodification.xml trong thư mục Shell vừa tạo

Hướng dẫn ghim phần mềm vào taskbar sau khi chạy sysprep

Như chúng ta cũng đã biết ngoài các phần ghim mặc định là trình duyệt Microsoft Edge, File Explorer và Windows Store, các phần mềm mà ta đã ghim trong khi build Windows 10 sau khi chạy sysprep khởi động lại sẽ bị mất hết chỉ còn lại những phần ghim mặc định kể trên. Vậy để giữ lại những phần đã ghim vào thanh tác vụ của Windows 10, chúng ta phải thêm vào tập tin trả lời unattend.xml để kết hợp với sysprep. Dưới đây là đoạn mẫu

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" 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">
<TaskbarLinks>
<Link0></Link0>
<Link1></Link1>
<Link2></Link2>
<Link3></Link3>
</TaskbarLinks>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TaskbarLinks>
<Link0></Link0>
<Link1></Link1>
<Link2></Link2>
<Link3></Link3>
</TaskbarLinks>
</component>
</settings>
</unattend>

Ví dụ theo thứ tự tôi muốn ghim các phần mềm Windows Media Player, Control Panel, Google Chorme và Excel 2016, tôi sẽ thêm vào tập tin unattend.xml đoạn sau

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" 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">
<TaskbarLinks>
<Link0>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Media Player.lnk</Link0>
<Link1>%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Control Panel.lnk</Link1>
<Link2>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Excel 2016.lnk</Link2>
<Link3>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk</Link3>
</TaskbarLinks>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TaskbarLinks>
<Link0>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Media Player.lnk</Link0>
<Link1>%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Control Panel.lnk</Link1>
<Link2>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Excel 2016.lnk</Link2>
<Link3>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk</Link3>
</TaskbarLinks>
</component>
</settings>
</unattend>hoặc các bạn cũng có thể ghi thế này cũng được

<Link0>C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Accessories\Windows Media Player.lnk</Link0>
<Link1>C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools\Control Panel.lnk</Link1>
<Link2>C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Excel 2016.lnk</Link2>
<Link3>C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk</Link3>Trong đó C:\ProgramData = %alluserprofile% và C:\Users\Default = %userprofile%

Phần link ghim được lấy trong thư mục Programs theo đường dẫn

C:\ProgramData\Microsoft\Windows\Start Menu\Programs

và thư mục Programs theo đường dẫn

C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

Phần đuôi mở rộng của phẩn mềm là .Ink ví dụ Windows Media Player.Ink, Control Panel.Ink, Google Chorme.Ink, Excel 2016.Ink....

Hướng dẫn tạo file Setupcomplete.bat

Để tăng thêm tính chuyên nghiệp bạn cần phải tạo một tập tin Setupcomplete có đuôi mở rộng là bat hoặc cmd, tập tin này có tác dụng chạy phần mềm, mở tài liệu, xóa file... có tác dụng ở ngay lần cài đặt đầu tiên. Tập tin này được đặt trong thư mục Scripts theo đường dẫn C:\Windows\Setup.

Trước tiên bạn mở trình soạn thảo notepad ra viết một nội dung như giới thiệu bản thân, liên hệ..., hướng dẫn người dùng cần làm những gì sau khi họ cài đặt xong, lưu ý viết thêm một đoạn nữa là bạn vui lòng tắt đi để chương trình tiếp tục cài đặt, sau đó lưu lại với tên gì tùy bạn ví dụ như Huongdan chẳng hạn. Bạn có thể đặt tập tin này trong ổ (C😃 chẳng hạn.

Tiếp tục ở trình soạn thảo notepad lên sử dụng các lệnh theo ý của mính và lưu lại với tên Setupcomplete.bat hoặc Setupcomplete.cmd

"\Huongdan.txt"
del /Q /F c:\windows\system32\sysprep\unattend.xml
del /Q /F c:\windows\panther\unattend.xml
rd /s /q "c:\Windows\Setup\Scripts"

Trong đó 2 lệnh del để xóa tập tin unattend.xml sau khi cài đặt, rd /s /q "c:\Windows\Setup\Scripts" xóa thư mục Scripts trong thư mục Setup và "\Huongdan.txt" là mở tập tin Huongdan đang lưu trong ổ (C😃

Mở rộng nếu bạn muốn chạy các phần mềm dạng exe thì bạn sử dụng cú pháp sau:

start "\[Thư mục lưu phần mềm]\tập tin .exe"

Ví dụ bạn muốn chạy trình duyệt Google Chorme chẳng hạn để truy cập vào web

Start "\ProgramFiles\Google\Chrome\Apllication\chrome.exe"

Tiếp tục truy cập đường dẫn C:\Windows\Setup tạo mới một thư mục có tên SCRIPTS hoặc viết thường là Scripts cũng được, tạo xong thì copy tập tin Setupcomplete.bat vào đấy

Tiếp theo bạn cần sử dụng Windows PE như Win 10 PE chẳng hạn để khi bạn chạy Sysprep xong boot vào Windows PE tạo tập tin gắn kết install.wim tương tự như cách mà chúng ta hay tạo ghost vậy. Nếu bạn có sẵn Windows PE dạng ISO bạn có thể gắn nó trực tiếp vào máy ảo nếu bạn sử dụng USB Boot thì bạn gắn tập tin ISO vmware boot vào.

Truy cập thư mục Sysprep chuột phải vào Sysprep.exe chọn Run as administrator tích vào ô Generalize và bấm OK

Sysprep sẽ bắt đấu chạy và tự khởi động lại bạn phải để ý phần này

Khi nó khởi động bạn phải nhanh tay nhấn Phím ESC để chọn Boot hoặc F2 vào Bios của máy ảo chỉnh boot đưa CD lên đầu, bấm các dấu (+) và (-) trên bàn phím đưa CD-ROM lên đấu và bấm phím F10 lưu lại. Nhớ kết nối iso Windows PE hay ISO của vmware boot vào máy ảo

Khi boot vào Windows PE trên máy ảo ví dụ như hình dưới là Win 10 PE

Tham khảo Windows PE tại chuyên mục Multiboot

Phần 5: Gắn kết các thư mục tập tin trong phân vùng cài đặt Windows 10 thành tập tin gắn kết install.wim và đóng gói thành bộ cài ISO hoàn chỉnh

Gắn Usb cài Windows 10 vào máy ảo truy cập thư mục sources của usb tìm và xóa tập tin gốc install.wim đi mục đích là chúng ta sẽ tạo mới tập tin install.wim thay thế

Bây giờ bạn phải xác định chính xác phân vùng nào dùng để gắn kết thành tập tin install.wim và phân vùng nào là usb cài Windows 10 như ví dụ hình dưới là (C😃 và (E😃

Chạy Cmd sử dụng lệnh bên dưới để gắn kết phân vùng cài windows (C😃 thành tập tin gắn kết install.wim được lưu trong thư mục sources của USB (E😃 với độ nén cao nhất

Imagex /Capture C: E:\sources\install.wim "Windows 10 Pro" /Compress maximum /Verify

Quá trình này hơi lâu tầm hơn 1 giờ đồng hồ tùy theo vào dung lượng của phân vùng cài Windows 10 (C😃 quan trong bạn phải giữ cho máy luôn bật và Usb không được mất kết nối với máy ảo khi đang diễn ra quá trình gắn kết file

Khi quá trình gắn kết tập tin install.wim xong bạn ngắt kết nối usb với máy ảo rồi tắt máy ảo đi

Khi có được tập tin gắn kết install.wim mới việc đóng gói thành ISO vô cùng đơn giản bạn chỉ cần mở Bộ cài ISO gốc lúc mà bạn dùng tạo ra usb bằng phần mềm UltraISO sau đó xóa tập tin install.wim trong thư mục sources đi


Hình minh họa
Tiếp đến bạn kéo tập tin install.wim trong thư mục sources của usb vào thư mục sources của UltraISO

Hướng dẫn bỏ qua màn hình nhập key và lựa chọn luôn phiên bản cài đặt lúc mới boot vào cài đặt

Bạn mở File ISO Windows 10 gốc ra truy cập thư mục sources kiểm tra xem có tập tin nào tên EI.CFG không? Nếu có bạn copy nó ra desktop mở lên bằng notepad ở phần [VL] là 1 thì bạn sửa thành 0 sau đó lưu lại và copy nó vào ISO mới.

Trường hợp nếu không có thì bạn có thể tạo mới tập tin EI.CFG bằng cách mở notepad ra ví dụ bạn muốn làm bản Windows 10 Pro thì copy đoạn mã sau

[EditionID]
Professional

[Channel]
Retail

[VL]
0

Lưu lại với tên EI.CFG hoặc viết thường ei.cfg cũng được định dạng All Files

Cuối cùng lưu lại thành file ISO khác và đặt tên mới cho nó là xong. Lưu ý save xong rồi bạn hãy đặt tên trên file ISO mới nhé.

Lưu ý nếu bạn có dùng chiếc usb lúc đầu dùng cài đặt Windows 10 mà muốn cài lại bạn phải xóa tập tin autounattend.xml đang lưu trong usb đi nhé không là lỗi không cài được

Nguyễn Anh Tuấn