Abstract
Recently at work I was asked about a project called tiny11, which is a minimalist Windows 11 ISO. While it is a very cool project, I did not think it was a good idea to use third party ISOs in production as we could not verify the integrity of the ISOs and make sure they were not malicious. However, we could certainly see about making our own ISOs and attempting to match what tiny11 does, while making modifications that fit our needs a bit better than tiny11 does.
About Tiny11
For anyone that is not familiar with the project, tiny11 is an attempt to remove as much of the bloat and unnecessary software that is included in Windows 11 such as Spotify, Facebook Messinger, and Instagram. A basic overview of the project can be found on tomshardware.com. However, tiny11 goes even farther by removing things like the built-in email client, calendar, and Edge. This amount of software removal is great for someone wanting a super minimalist Windows 11 installation, however, I was asked to look at this for deploying workstations at my job and our team does not actually want to remove things like Edge or OneDrive. In addition to that, I did not think it was a good idea to use a third party ISO. Thankfully, the creator of tiny11 posted a nice script on GitHub that automates and documents the process so it is easy to make your own custom ISOs of Windows.
Creating Trimmed Windows ISOs with tiny11builder
Starting the process of creating a custom Windows image is not particularly difficult and only requires two things: A Windows ISO (Windows 11 in this case) and a working Windows installation. Thankfully, the official Windows 11 ISO is available on Microsoft’s Website, from there you can create a Windows 11 VM, or install Windows 11 on a physical computer to continue with the process.
Note: If you are running Windows you will likely have to change your user agent in your browser to be given an option to download a Windows ISO. Microsoft prefers users using their tool to create Windows installation media.
Then simply go to GitHub and download the scripts, that can be done either by downloading the zip file, or running a git clone on this repo. Taking a look at the tiny11creator.bat script shows that the DISM tool is the star of the show. Not only removing a lot of the bloat from Windows, but also simple things like just mounting the image to be modified. Unfortunately the script will likely not work as is though; the package names that DISM uses to remove software change with each Windows release. So, if the Windows ISO downloaded does not match the version used in this script, it will not actually remove the software from the image. There is a solution to this though; simply mount the image and ask DISM for the software installed on the image. That can be done by doing the following:
- Mounting the downloaded Windows ISO in File Explorer
- Open an Administrative command-prompt to run the following lines
:: Directory to copy Windows image filess/folders to
md C:\WindowsImage
:: Copies Windows image located at %DriveLetter% to C:\WindowsImage
xcopy.exe /E /I /H /R /Y /J %DriveLetter% c:\WindowsImage
:: Shows the different versions of Windows that can be worked with
:: (home, pro, enterprise, etc) We will use Pro which is 6 by default
/Get-WimInfo /wimfile:C:\WindowsImage\sources\install.wim
dism
:: Creates a scratch directory to mount the image in
:: Note, we are mounting the copy to not mess up the original ISO
/mount-image /imagefile:C:\WindowsImage\sources\install.wim /index:6 /mountdir:C:\scratchdir
dism
:: From here we use DISM to ask about package information on the image
:: It is a lot of data, and would probably be worth copying/pasting into a text file
:: for later use
:: Retrives ProisionedAppxPackages
:: Copy the output into a text file to keep for later
/image:C:\scratchdir /Get-ProvisionedAppxPackages
dism
:: Retrives System packages
:: Copy the output into a text file to keep for later
/image:C:\scratchdir /Get-Packages
dism
:: Unmounts the image
/unmount-image /mountdir:C:\scratchdir /commit dism
This process will not only give the packages that are come installed
in the ISO, but more importantly give us the package names so that we
can use DISM to remove them. Make a copy of the
tiny11 creator.bat
script in the repo and open it in your
favorite text editor. This is the most tedious part of the process, and
where a choice of text editor will potentially save a lot of time,
replace the package name in the script with the package name you
retrieved from the Windows ISO you downloaded. If the package name in
the script does not match what is in the Windows image exactly, DISM
will not remove it and the package will remain on your computer. Once
that is done, do the same thing for the regular packages in the script.
There may be some packages that you would like to keep, for those just
comment the line out by putting a ::
at the beginning of
the line; Some of the package names are not very clear, so using the
echo
above the DISM command will help give an idea of what
is being removed. You can also comment out anything else that you may
not want to modify, for example, our team does not actually want to
remove the hardware requirements from Windows 11, and we do not need to
enable the ability to use a local account as it is relatively easy to
bypass the online account without the registry modifications. You can
either type user
and the username and password for the
online account, or you can create a provisioning
package that creates a local user for you. Lastly you may want to
modify the ISO creation line as when I ran it, Windows did not
understand %~dp0
at the beginning of the line, so I
replaced it with .\
and changed the location of the ISO to
C:\temp\tin11.iso
. Now that we have our script that matches
with the Windows ISO we downloaded, we can follow the instructions in
the readme.md
file in the repo, and run our script instead
of the tiny11 builder.bat
, following the instructions in
the script and waiting for a while, we will get an ISO image for Windows
11. After several iterations of testing, I have gotten Windows 11 to run
happily on 4GB of RAM and with 2 virtual cores. While it’s not quite as
impressive as the original author of the script, it fits my companies
needs much better than his version of tiny11 does.