I have been investigating using the WIM file from inside an Windows 10 installer as the basis for a Winclone restore, and I have some results to share. Here is what I did:
- Extracted WIM from ISO.
I downloaded en_windows_10_enterprise_n_version_1703_updated_march_2017_x64_dvd_10189280.iso from Microsoft and found the install.wim in sources. - I copied that file to my desktop, renamed the install.wim file to Windows.wim, and replaced the existing Windows.wim in a file-based Winclone image. I first right clicked on the image, selected “Show Package Contents”, then replaced the current Windows.wim file:
-
I then restored that image to a boot camp partition using the current Winclone 6.1 beta (earlier versions had some file permission issues with some ISOs.
-
I then booted into Windows and there was a generic Windows 10. However, on my MacBook Pro (touchbar) the keyboard and mouse didn’t work (as well as a lot of other stuff that required drives, I’m sure).
-
I then restored the same Winclone image again, but before booting into it, I mounted the Boot Camp R/W using the “Mount Read/Write” feature in Windows 6.
-
I then downloaded the current Boot Camp drives from inside Boot Camp assistant:
-
I put the BootCamp folder and WinPE into a folder called Winclone and copied that to the root of the Boot Camp volume. I don’t believe the WinPE folder was used, but it was nice to have it there in case it was needed by the MSI.
-
Now I needed something to actually install the drivers on first boot. I created an unattend.xml and put it in Windows/Panther/Unattend folder (I had to create the folder structure as well). The unattend.xml looks like this:
https://bitbucket.org/snippets/twocanoes/GGd5Ry
The unattend did 3 important things:
- Creates a user
- Allows autologin of that user on first boot
- Runs a script C:\Winclone\logon.bat when that user first logs in.
The script is very simple. It just installs the boot camp drivers. Here is the entire script:
msiexec /i C:\Winclone\BootCamp\Drivers\Apple\BootCamp.msi /qb- /norestart
pause
- I then copied the script to the boot camp partition in the Winclone folder at the root. The final result is this:
I then booted into Windows and after a few minutes of it configuring itself, the user was logged in and all the drivers were installed.
The really interesting pieces of this are:
- Windows was never booted into until that first boot. This makes for a very clean image.
- The drivers are installed separately so that they can be updated separately from the image.
- You can add in all sort of additional hooks. Specifically, you can add in a script to bind to AD and install SCCM. After that, the MS tools can install and configure the box.
Let me know what you think. My current thought is to add this to WInclone Pro as a feature to “import WIM”, and when you do, a sheet similar to the package tool appears. You will then be able to specify options such as scripts to run and resources to include.
tim