PixelCove

Using Answer Files to Clean Windows

automation
windows

Introduction

Customizing a Windows installation to fit your needs can be a tedious and time-consuming task. However painful the process is though, there is hope. This article will guide you through the steps to strip down a Windows installation to its essentials, use Chris Titus Tech’s Windows Utility to add necessary tools, and achieve a tailored, efficient setup.

Introducing Answer Files

Answer files are like recipes in a way. They act as instructions for a computer when installing Windows. Instead of having to tell the computer a bunch of information during the install process, answer files tell the computer everything it needs to know. This allows you to automate and speed up the process of installing Windows.

Answer files allow you to do a lot more than just pre-filling information though. They allow you to specify how disks should be partitioned and formatted, install drivers and applications, enable/disable Windows features and services, automated system updates, and run commands on the system after installation has completed. By using answer files you can tailor the entire Windows setup experience to meet your needs.

Stripping Windows to The Essentials

After some digging I found a GitHub repository It has had everything that is not essential to running the operating system nuked. That means there is no OneDrive, Edge, Copilot, or annoying web results in your system search menu. Everything that can be removed has been removed. On top of that all Privacy settings have been disabled.

Chris Titus Tech’s Windows Utility

Luckily a savior is on our horizon! This tool created by Chris Titus Tech allows us to download things such as a web browser, dev tools, and other utilities by just toggling some check boxes and hitting install.

You can run it by opening PowerShell and running the following command:

irm https://www.christitus.com/win | iex

There’s just one problem, our Windows install doesn’t have a terminal as it and many other utilities you are used to in Windows have been removed. So how will we run this program? By adding a post install script in our answer file! After the installation completes our post install script will run out output the following file onto the desktop:

Windows-Utility.ps1
irm https://www.christitus.com/win | iex

Now we have everything we need! If you wish to follow along with the rest of the article you are going to need an answer file of your own. You can either download the answer file provided below or you can go to https://schneegans.de/windows/unattend-generator/ and generate your own. answer file download

Remember to always check files you download from the internet. Just because the author says the file is a picture of a duck DOES NOT mean it is a picture of a duck!

Tutorial

Start by downloading either Windows 10 or Windows 11. Once we have the base ISO file we need a way to add our autounattend.xml file. To do this we can use a tool called AnyBurn. Once installed choose “Edit Image File” option and choose the Windows ISO you downloaded earlier. Then click on “Add” and select the autounattend.xml file. Then click “Next” and “Create Now”. Finally when it asks to overwrite the old ISO file click “Yes”. Once that has completed you can close AnyBurn and move to creating a bootable USB.

Bootable USB

You can use a program such as Rufus to create your bootable USB. Follow these steps:

  1. Download and open Rufus.
  2. Select your USB Drive.
  3. Choose the Windows ISO file you just modified with the autounattend.xml file.
  4. Click “Start”.

Do not select any of the “Customize Windows Experience” options as it will create another answer file.

Installing

Finally you can boot into the Windows Install USB, do a clean install of Windows as normal, and everything else will be handled automatically. During the install your system will reboot several times. After the initial install setup your system will restart and proceed to the Specialized Phase. During this phase a bunch of terminal screens will pop up and disappear. Just wait for all of this to finish and when it’s done your system will restart again. You will be taken to the onboarding experience and you can go through all the prompts as normal. Once you get to the desktop another window will appear. Once that window disappears your computer will restart one more time and when you’re back in the system you are good to go.

Getting Up And Running

Now that you have a bare bones Windows system you will want to right click the file on your desktop and hit “Run with PowerShell”. This will execute the script and when you can see the menu with all the software options, you can choose what to install on your system. After choosing all your options click the “Install/Upgrade Selected” button in the top left and wait for it to complete. After it finishes you will have the software you selected installed and be able to download things from the internet as normal.

Conclusion

By using answer files, you can streamline the Windows installation process. Stripping Windows down to its essentials and leveraging powerful tools allows you to create a lean, efficient system with only the necessary components and software. This approach not only saves time but also enhances your overall experience by providing a cleaner and faster operating system.

Whether you’re a tech enthusiast or a system administrator, automating installations with answer files and post-install scripts offers a powerful solution. Follow this guide to achieve a customized, efficient Windows setup and enjoy a streamlined environment tailored to your needs.