What if you wanted to capture your brand new laptop as a custom bootable Windows 10 ISO already preset with your user settings and pre-installed software?
I performed this capture as an experiment while writing crib notes for accuracy, then fleshed them out further so a computer novice friend (and nearly anybody who can type and click) could follow along. The guide was validated using Windows 10 Pro v1703 on my EVOC Clevo P650HS-G, and some steps include USB-->USB transfers since my laptop is an offline machine. The ISO creation protocol works for Pro and Home, but Hyper-V is not included and can't be installed in Win10-Home; free alternative hypervisors exist.
You can go from a power up, to a custom.ISO, to validating your custom.ISO on your laptop in a virtual machine in less than an hour, not including download times. All without allowing your new laptop on the internet... as long as you have a second computer and USB drive![]()
Download this guide as a text file: https://pastebin.com/9SPSRBRU
Fix Control Center Application error in VM
Phase 1
Get your laptop out of the shipping box, power it up, and install Macrium Reflect free edition; no, seriously, do this. Follow the guide by @Phoenix (but don't move any libraries, folders, etc.) and save an MRIMG or two on an external device or two.
Phase 2
Create a custom ISO with your user settings and pre-installed software.
** It's nowhere near as long or complicated as it looks **
Build Process:
A) Setup drive(s), apply labels, make folders
B) Download/extract Windows ISO template
C) Create bootable WinPE flash drive
D) Download/install ADK Deployment Tool
E) Clean partition
F) Create custom install.wim
G) Replace downloaded ISO install.wim
H) Create new bootable custom.ISO
Test Process:
I) Enable/setup Hyper-V
J) Install/run custom.ISO in the VM
K) Boot/install custom.ISO on your SSD
Phase 3
L) Teleport back to the start using the initial Macrium MRIMG files
============================================================
Capture your new laptop as a custom.ISO
Requirements:
Your laptop and a flash drive,Note:
An Official Windows 10 v1703+ ISO,
The Windows Deployment tools (free from MS).
Your complete Windows installation must be 100% on a single partition or it fails.
Phase 1
*) Save a couple Macrium Reflect MRIMG backups
Phase 2
A- Setup or partition source machine drives
- partition your primary SSD1) Press Win + R
- and keep your 2nd SSD as a safe storage reserve
2) type "diskmgmt.msc", hit enter
Right-click D: (your 2nd drive)3) Exit disk manager
select "Change Drive Letter..."Right click E:, select properties,
select "Change"
assign letter "E" or higher, OK.
label E: as Drive2, Storage, or whateverRight-click on C:, select "Shrink Volume"
Reduce the volume of C: by >=65GB
ideally ~split volume, e.g. 500-->200/300Right-click new Unallocated box graphic
select New Simple VolumeRight-click C:, select properties
specify size >=65GB = shrink amount
assign drive letter D:
Label volume as "Data", finish wizard.
Label C: as "Windows"Label all other drives at this point for clarity.
4) On Data(D:)
Create a folder named "Scratch"5) Restart your laptop.
Create a folder named "Iso_files"
Create a folder named "Hyper-V"
* Alternatively, use two drives for the setup
- It's a little faster. That's it.1) Letter and label SSDs as Windows(C:) and Data(D:)
Right-click drives in Windows Explorer2) Label other drives now for clarity
click properties, type in the names
3) On Data(D:)
Create a folder named "Scratch"
Create a folder named "Iso_files"
Create a folder named "Hyper-V"
B- Download/extract Win10 ISO for the custom build template
-Match your download to your installed OS version1) Download ISO from windowsiso.net
(alternatively, use the download tool at HeiDoc.net)Select Win10 version from drop-down list
e.g. Win10 1703 CU Download>StandardScroll down, select language/version:
select the English, x64 link on farthest rightYou can verify this download via MD5, SHA1, SHA256 checksums:
=Win10_1703_English_x64.iso (4,232,730 kb)
Download>install HashCalc (or HashMyFiles, etc.)
Browse to Win10 ISO in Data box
Click Calculate, wait 1.5-2 min for sums
MD5=effccfda8a8dcf0b91bb3878702ae2d8
SHA1=ce8005a659e8df7fe9b080352cb1c313c3e9adce
SHA256=b842a801bf1dedf3acbfd909f91fb2a741eef20fda133daa1878e46a07ec9237
Note:
Win10 ISO CRC/MD5/SHA1/256 checksum dump:
use browser search to easily find all three calculated sums.
https://pastebin.com/fgqtG3mJ
Microsoft SHA1 Hash Archive:
you can query using the calculated SHA1 sum
http://www.heidoc.net/php/myvsdump.php
2) Save downloaded ISO to USB, move to the source laptop
Copy ISO to Data(D:)3) Mount the moved ISO by double clicking
4) Copy all of the files to D:\Iso_files
note that the folder D:\Iso_files\Sources now exists5) Unmount the ISO by Right-click>Eject
The official ISO file isn't used later, but keep it handy.
C- Create bootable Win10PE from the Win10 1703+ ISO
1) Quick-format a small flash drive (even 0.5 GB is fine)
Right-click, select format>Quick-format>start2) Browse to D:\Iso_files
3) Copy all of the contents EXCEPT the "sources" folder to the USB drive
4) Create a folder named "sources" on the USB drive
5) Browse to D:\Iso-files\sources and find "boot.wim"
6) Copy "boot.wim" to your empty USB "sources" folder
= Finished!7) Label the USB WinPE drive
= drive has 0.32 GB of files
Right-click, select Rename = DISM-W10PE
- serves as reminder of the build method.
- DISKPART and DISM work, that's all you need.
* Nothing stops you from using the remainder of your flash drive.
* Make a folder called "Other files" and use it!
D- Install Windows Deployment Tools feature
1) Download Windows Assessment and Deployment Kit (ADK) for Windows 10
- URL is in my downloads section2) Match the ADK version to your Windows version, e.g. use ADK 1703 for a Win 1703
- direct install is more time/data efficient (see note below)
Perhaps unnecessary, but logical3) Download and run the installer file
Select download for use on another machine4) Move USB drive to source computer
Opt out of Microsoft data collection
Save toolkit (3.05 GB) to USB drive
5) Run ADK setup file
Click through screens, Opt out of data collection6) Restart laptop
Select ONLY the necessary Deployment Tools feature (67.5 MB)
Click Install
- Windows may not find the .msi file:
- Browse to /Windows Kits/10/ADK/Installers if asked
-Finalizes all of the changes made so far.
** Direct Install Note:
If your custom.ISO source machine is allowed on the internet:
a) Run the installer
b) Unselect everything except for the Deployment Tools
c) Directly install only the Deployment Tools feature
d) Restart
E- Clean source machine partition using Extended Disk Cleanup
-Clean up a little, a lot, or everything as you prefer.1) Open an elevated command prompt
-follow below for the "new laptop ISO"
Press Win+X > Powershell (Admin)2) Run the following command:
type "cmd", hit enter
"cmd.exe /c cleanmgr /sageset:1 & cleanmgr /sagerun:1"3) Don't close the command window yet
- the exact sage# isn't important as long as they match
4) Select everything in the cleanup options popup window EXCEPT:
:the 'green arrow' Windows update/upgrade files5) Clean recent files history
(the 'green arrow' files should go into the custom.ISO)
* Note: "sagesets" won't cleanup Windows setup files (e.g. ~BT, etc.)
To fully clean up after an upgrade, or install in the VM:
type "cleanmgr /autoclean", hit enter
In File Explorer:
click File tab > select "Change folder and search options"
click the "Clear" button under Privacy
close File Explorer
* STOP clicking things!
* Your system is ready for imaging!
* Turn off your laptop.You now have:F- Create custom install.wim file
1) Boot source machine using DISM-W10PE from step-B (or other WinPE)
Plug in USB stick, reboot while hitting F72) Press Shift+F10 at Language/Time/Currency Screen to open command prompt
Choose USB drive from the options
type "diskpart", hit enter3) Enter the following command to create the .wim file:
type "list vol", hit enter
Inspect the list and note volume letters:type "exit", hit enter to exit diskpart (but not cmd)
-letters ~may vary, but labels are static
-use the volume letters showing labels for:
Windows = source drive to copy from
Data = drive location to save .wim file
Exact characters and spacing! No brackets!
[dism /capture-image /imagefile:D:\install.wim /CaptureDir:C:\ /ScratchDir:D:\scratch /name:"W10Pro-slimmolG" /Description:"EVOCp650,W10P plus user, noMods" /compress:maximum /checkintegrity /verify /bootable]
-The Deployment Tool information displays
-The cursor blinks for 30 seconds
-The Saving Image information displays
**custom install.wim (~10GB) is created in 9.5-10.0 minutes
4) After .wim file creation, exit cmd window
5) Close Install Media window
click Yes to cancel install and allow reboot6) Verify your captured source system info:
Press Win+X > Powershell (Admin)[dism /get-wiminfo /wimfile:"d:\install.wim" /Index:1]
Enter the below command without brackets:
Capture Command Notes:
/imagefile:D:\install.wim = save location drive letter and file info
/capturedir:C:\ = Windows source drive letter info
/ScratchDir:D:\Scratch = drive\folder location to let dism find Scratch space
/name:"Anyname" = Necessary argument, but the actual name isn't important. It labels the image created in .wim
/Description:"YourChoice" = Optional argument; can omit whole segment, but adding a descriptive comment helps identify the final ISO.
G- Replace downloaded ISO install.wim with custom version
1) Browse to your custom install.wim on Data(D:)
2) Copy your custom install.wim to the Sources folder in ISO_files (D:\Iso_files\Sources)
- This will replace the original install.wim from the downloaded ISO3) Rename your backup copy of D:\install.wim to "FactoryFresh-install.wim"
- Note that it must be changed back to install.wim to reuse
H- Create the bootable custom.ISO
1) Run Deployment and Imaging Tools from ADK as an administrator
On the start menu, find Windows Kits/Deployment and Imaging Tools2) Type "cd\" and hit enter to shorten the long path
Right-click>More>Run as Administrator
3) Run the following command:
Exact characters and spacing! No brackets!
[oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bd:\iso_files\boot\etfsboot.com#pEF,e,bd:\iso_files\efi\microsoft\boot\efisys.bin d:\iso_files d:\sweetnewfile.iso]
*sweetnewfile.ISO is made in ~1 minute
-BIOS bootable via the [etfsboot.com] bootdata.
-UEFI bootable via the [efisys.bin] bootdata.
Note:
d:\iso_files = REPLACE all three instances if your copied official ISO files are elsewhere.
A) custom.ISO file on D:\
B) custom.wim file on D:\
C) extracted official ISO files in D:\Iso_files
D) an empty folder at D:\Scratch
E) a still empty folder at D:\Hyper-V
You now have:Test your custom.ISO for functionality
I- Enable Hyper-V virtual machine manager
-perform after step-B to include Hyper-V in your ISO1) Run Powershell as administrator
Press Win+X, click on the admin link2) Type the following command at the prompt:
"Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All"3) Enter Y to allow reboot
A few, then more circles appear, then it finishes
Windows integrates Hyper-V, updates settings, auto-reboots
*Note: Win10-Home does not include Hyper-V. Use 3rd-party hypervisor.
J- Create/start virtual machine running custom.ISO
1) Open Hyper-V Manager via start menu
2) Adjust Server settings:
Select 'desktop' under Manager in left panel3) Add new virtual machine
Click Hyper-V Settings in upper right Actions panel
Ensure Enhanced Session Modes are enabled:
:in the new upper Server panel
:in the new lower User panel
Right-click the server node (the little 'desktop' again)4) Adjust VM settings
Select New>Virtual Machine
Name=VirtMach1,
Store location change to D:\Hyper-V
Generation=2
Assign startup memory= 4,096 MB (8,192 MB is better, if laptop has 16GB)
**Unselect Dynamic memory option**Networking=not connected
Create VHDx, size=45 GB
*~10 GB ISO expands to ~27 GB in VHDxInstall OS from ISO:
* WinSetup balks at 35 GB and recommends 44 GB
(Enhanced Sessions Mode has some virtual bulk)
Browse to your sweetnewfile.ISOClick Finish.
Right-click VirtMach01, select Settings5) Run virtual machine
In Security panel, uncheck Secure Boot optionclick Apply, and OK to close window
In Integration Services panel, add check to Guest Services
In Checkpoints panel, set to Standard
Double-click VirtMach01 to open VMconnect window6) Install Windows (this will install your custom version)
click "Start" within window
When asked, press a KEY to boot.
If text is a little fuzzy, adjust VMconnect View>Zoom
Select languages, etc., hit next, hit Install Now
Select "I don't have a product key"
Select CustomInstall, Next, etc.
~5 minutes of installation until restart notice appears
customized Win10 starts in a 4:3 VMconnect window
The VMconnect resolution+resources dialogue box now appears...
DO NOT immediately click the Connect button.
Let installation initialize devices>get ready>Login screen.NOW select Show Options at the bottom of the connect dialogue
or simply let the installation auto-signin>desktop.
check "Save my settings..."click CONNECT
VMconnect flashes>resizes>restarts>login screen.VM install notes:
Sign-in to your new prepared virtual machine
* If you forgot to uncheck Dynamic memory, auto-restart will fail.
If you allocated a tiny amount of memory, the same...
but, you can manually Turn off VMconnect at blue screen and Restart VM.
* If you immediately Connect when you see the 'resolution' dialogue
you will have blue screen Remote Desktop Services problems
* After ~0-1.5 minutes a Control Center Application dialogue pops up7) Create a checkpoint for your virtual machine
Just okay it, and ignore. It's an irrelevant "HotKey in VM" issue.
Click Action>Checkpoint on the VMconnect toolbar
- a checkpoint will appear in the Hyper-V managerWhy are checkpoints useful?
1st: Checkpoint>make changes>install programs>etc.>Checkpoint2
2nd: Now Right-click>Apply to switch between two checkpoints in seconds (yes, seconds)
Notes:
* If you StartMenu>Restart your guest OS (i.e "in the window"), you will see RDS error upon restart
* If you Shut Down via the VMconnect menu it will be fine:
The initial "good resolution" VMconnect shuts down.
VMconnect flashes.
4:3 VMconnect window shuts down OS, goes to black.
A version of your new laptop, running on your new laptop!
![]()
Feel free to poke around in the guest OS (i.e. the custom.ISO installed in Hyper-V), your physical laptop system is safe from all your poking. Enable/disable whatever you like, surf the registry, finally get around to deleting that pesky system32 folder...
K- Install your custom.ISO on your source machine SSD
* Warning for partitioned drives:
* If you imaged C=full disk, and then decided to partition, reinstall still restores C=full disk.
* Therefore, ensure novel partitions are backed up externally.
1) Your custom.ISO is already bootable!
Grab and quick-format a flash driveAlternate method using Rufus:
Right-click, select formatDouble-click sweetnewfile.ISO on (D:) to mount it
default=NTFS, 4,096 bytes, Quick Format
Copy all of the contents to the USB drive
= Finished.Reboot while hitting F7
Install your custom Windows10
Download Rufus onto a flash drive, transfer it to Data(D:)
Open Rufus, point it to your sweetnewfile.ISO
-See the Rufus guide by @Phoenix for more infoSkip these notes if you can partition without trouble, and already have a Win10 ISO and WinPE USB drive.
Notes.A-###
My primary drive initially couldn't be split due to a system restore file sitting right in the middle of C:
-Resolved by disabling Restore
-Remove hibernation now too if you don't use it.
1) Disable System Restore:
Control Panel>System>System Protection2) Disable Hibernation
click "Configure" button
click radio button to Disable sys prot.
Press Win+R for command prompt3) Trim SSD
type "powercfg /h OFF", hit enter
Note: no confirmation is given.
Press Win+X > PowerShell (Admin)
type "Optimize-Volume -DriveLetter C -ReTrim -Verbose"
Notes.B-###
There are a several ways to get your Win10 ISO from Microsoft:
1) Option 1- Use the ISO downloading tool from HeiDoc.net
Download the tool and run the .exe, install isn't needed.
Select your ISO from many download options.
2) Option 2- Download directly from Microsoft
Your download choice will be selected by Microsoft
Go to the Windows ISO download page
Download what Microsoft lets you, i.e. 1709 right now
3) Option 3- Download preferred ISO from a list of choices
Go to the Windows ISO download page4) Save downloaded ISO to USB, move to the source laptop
*Change the User Agent String in Chrome/Opera by:
opening developer tools = ctrl+shift+i
click "3-dot" drop down box within developer tools
select More Tools>Network Conditionsrefresh browser to reload current webpage
uncheck Select Automatically
Select a "custom" non-windows choice like Linux, Mac
Current page reloads as a Linux/Mac/etc machine page*Closing the webpage restores automatic detection.
Choose from new options on webpage and download
*Calculate/record/check the hashes if you like
Copy to Data(D:)5) Mount the downloaded ISO by double clicking
6) Copy all of the files to D:\Iso_files
7) Unmount the ISO by Right-click>Eject
The official ISO isn't used later, but keep it handy.
Notes.C-###
There are several alternative methods to obtain an "official" WinPE via:
-Use your full ADK download from step-D
-Direct download of Windows Install Media
-Use WinPE implemented in a Macrium Reflect rescue disk
>If you download the full ADK suite you can make an "official" WinPE10"
1) Open ADK setup as in step-D and install WinPE feature
2) Quick-format a USB drive
Right-click, select format>Quick-format>start3) Run Deployment and Imaging Tools from ADK as an administrator
On the start menu, find Windows Kits/Deployment and Imaging Tools4) Identify your USB drive letter
Right-click>More>Run as Administrator
type "copype amd64 D:\WinPE_amd64", hit enter
type "diskpart", hit enter5) Create the WinPE USB drive
type "list vol", hit enter
-note the letter of your USB drive
type exit
* Replace "F:" with your USB drive volume letter if different!6) Your flash drive is now:
type "MakeWinPEMedia /UFD D:\WinPE_amd64 F:"
hit enter
Type "Y" to proceed with format.
Program displays:
Setting the boot code on F:
Copying files to F:...
Success
:labeled as WinPE
:populated with 266 MB of files
>Re-download the entire WinPE dataset from Microsoft:
1) Download the Windows 10 media creation tool
2) Right-click, Run As Administrator
Choose 64-bit3) Insert USB flash drive
Create installation media for another PC
4) Select media choice of "USB Flash Drive"
Flash drive now has lots of files (3.55 GB)...
>Make and use a Macrium Reflect rescue disk
1) Click "Other Tasks" on the file menu
select "Rescue Disk"2) While booting to the MR rescue disk you MUST:
follow wizard...
- NOT CLOSE the MR application, or your computer restarts!
- minimize the MR application
- use the command prompt for DISKPART/DISMLinks current as of 01/2018(*)This guide on pastebin:
(*) Download the free version of Macrium Reflect 7
(B) Download Windows Assessment and Deployment Kit (ADK) for Windows 10
(C) Download Win10 1703
(C) Download HashCalc
(C) Win10 ISO CRC/MD5/SHA1/256 checksum dump:
(D) Download Windows 10 Media Creation tool
Microsoft's DISM command-line options/explanations
https://docs.microsoft.com/en-us/wi...gement-command-line-options-s14#capture-image
Microsoft's Oscdimg command-line options/explanations
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/oscdimg-command-line-options
The following two tutorials provide in-depth coverage of specific aspects of this guide, with additional info for actually building the ISO within a VM. Both tutorials contain DISM/Ocsdimg command line examples for comparison.
EchoRelay's Final Thoughts from IT tutorial:
https://finalthought.org/2017/04/12...ws-10-version-1703-media-iso-wim-flash-drive/
Kari Finn's TenForums tutorial:
https://www.tenforums.com/tutorials/72031-create-windows-10-iso-image-existing-installation.htmlPhase 3:
L- Use your MR rescue disk to run MR in WinPE
* Warning for partitioned drives:
* Your pre-partioning MRIMG of C=full disk, will restore C=full disk,
* therefore, ensure any novel partitions are backed up externally
1) Pop in your Macrium Reflect rescue disk from Phase 1
Follow the guide by @Phoenix to refresh your memory2) Browse to your MRIMG file
3) Bam! Experiment over... You're back at the start!
Lather, rinse, repeat as desired.
============================================================
And good luck Dave, your hour starts... now!
Edit: Dave made it in 1.25 hr but blamed it on the "anti-intuitive' effects of too many energy drinks (sure... lol)
-
I have been making multi-boot OS laptops and desktops / servers - with any bootable partition being usable as host or guest. And, this includes taking snapshots of configuration I've built so I can support them away from the datacenter.
It's tough enough to get the average user to do a full metal backup of a drive / set of partitions to be able to restore back to it, going several steps further allowing them to boot into it as VM's as you (apparently) and I do, seems a bit to much to hope for.
Since I do Linux / VM's professionally, I don't provide help or assistance publicly.
So, I hope you can stick with this and help support people past the hiccup's and conceptual steps to success, as I think it's the way to go moving forward, even for individuals.Last edited: Jan 13, 2018Vasudev likes this. -
Last edited: Jan 19, 2018Vasudev likes this. -
Fix Control Center Application error in VM
Running your new custom.ISO in a Hyper-V virtual machine produces a "System needs to be restarted again for Control Center Application" dialogue box ~1.5 minutes after you see the guest desktop. Don't worry, the ISO is fine and the issue will not appear when installing to an SSD.
The simple solution = Click okay. That's it.
That new popular spelling for "Information" is popping up everywhere:
The actual solution = Turn off HotKeyTray in Task Manager:
Note this isn't permanent, and it will revert when you turn off the VM (unless you click to save a checkpoint first, so just click it... why not?)
1) Win+X>select Task Manager
click More Details in the lower left2) Select Startup tab
3) Right-click HKeyTray(5) and disable
-one setting disables all HK subheading components-the guest OS is fine without HotKey4) Save a checkpoint.
Note:
* The host machine Task Manager will show HKeyTray(32 bit), Hotkey Filter Clipboard Service, HotKey service(32bit), and ComboKeyTray(32bit) are running, but the guest OS doesn't run HKeyTray(32bit) or the ComboKeyTray(32bit).
* The host TaskManager entry for HkeyTray has 5 subheadings under the startup tab: two for ComboKeyTray, one for GetSMBIOS, one for HKeyTray, and one for HkeyTray2. The guest Task Manager will only show entries for HKeyTray and HKeyTray2.
Capture your new laptop as a custom ISO with users and programs
Discussion in 'Windows OS and Software' started by slimmolG, Jan 13, 2018.