TechCrafting custom windows installers: Streamline your system setup

Crafting custom windows installers: Streamline your system setup

Microsoft allows the download of a Windows installer ISO image and provides a tool to burn it onto a USB drive. However, such media are not tailored for any specific computer. How can you add drivers to it and remove unnecessary applications?

Windows: installation media
Windows: installation media
Images source: © Dobreprogramy | Kamil Dudek

3:57 PM EDT, October 25, 2024

Modifying the installation image is not "hacking" but rather a supported option by the manufacturer. Without it, providing custom drivers and OEM applications would be impossible. You can perform your modifications using the OEM adaptive tool, the Windows AIK package, or by interacting directly with the DISM program.

There is also an unofficial but very advanced and effective tool called NTLite, which allows you to achieve a comparable effect. NTLite internally uses the system DISM and automatically implements workarounds for many errors and uncommon behaviors and limitations of the Windows servicing stack. This makes it an excellent tool for personal use.

Your own installer

Preparing your installation media primarily involves integrating drivers and removing unwanted applications. The second step involves creating a preliminary default configuration for many settings. Two things are not typically done anymore: integrating the product key and providing answers to the OOBE phase, which is the first-time setup.

Before Windows 10, all questions regarding advertising identifiers, store settings, updates, privacy, and speech and handwriting recognition could be answered in the unattended phase. Today, this is unsupported. The technical capability still exists but occasionally has side effects that, in extreme cases, make it impossible to log in.

The first step to preparing your image is downloading an installation ISO file for Windows. As we know, Microsoft recommends the Media Creation Tool for this purpose. However, by using the User-Agent Switcher and Manager extension in your web browser and presenting yourself as a Mac, you can obtain direct links to download the ISO. The downloaded image should be unpacked, and the install.wim file found in the directory should be hooked up to NTLite. In NTLite, you can select the edition of the system you are using, for example, Pro. The selected edition is then mounted.

Updates and drivers

The next stage is integrating updates. NTLite allows you to integrate the latest system updates as well as those of the installer itself, making the installation process faster and more stable, shortening initial logins, and requiring fewer restarts. NTLite downloads the required updates from the Windows Update catalog when you use the "Latest updates online" option.

After integrating updates, it's time to integrate drivers. At this stage, two aspects are important: whether you are creating the USB drive for the same computer on which you are working, and whether the hardware manufacturer provides drivers in an accessible form.

The driver installation view displays a list of devices in the computer for which there are no drivers in the Windows installation image. You should ignore Bluetooth paired devices, VirtualBox virtual network adapters, VPN clients, and graphic cards, as their drivers do not integrate well and are best installed separately.

NTLite does not directly allow for the simple copying of drivers from the system to the image. This option is a premium feature. With caution, it can be overridden by exporting the drivers yourself. The folder with the exported drivers should then be added, in its entirety, to the Driver Queue section. However, several unwanted items will appear on the list that you need to remove yourself.

If you prefer not to rely on intuition, drivers should be downloaded from the manufacturer. Sometimes this is very easy—for example, Lenovo provides an "SCCM package," which is an archive with drivers formatted for integration. Conversely, Gigabyte only offers EXE installers, which must be manually unpacked.

Removing components

After driver integration, it's time to remove components. Windows offers a component-based approach to the installation image, but removing components expected by Windows Update will make it impossible to update the system. However, there is one component serviced separately, and those are APPX applications. In the Components section and the "Applications" subsection (not "System Applications"!), you will find a list of elements whose removal will significantly speed up the first login and reduce the time needed for background updates conducted by the system Store.

Here, you can remove often-unused and replaced applications such as Clipchamp, Outlook, Mail, Xbox tools (Game Bar, TCUI, Identity Provider, Xbox App), Office ads, News, Photos, Teams, Weather, Power Automate, Solitaire, and Alarms. Although it is also possible to remove Defender and system applications, doing so will prevent the system from updating and may lead to unpredictable and poorly understood compatibility issues. This NTLite feature is intended for preparing test images for specific purposes.

Custom settings

The last steps in preparing your own installation USB drive involve integrating custom configurations. You can enable frequently used features post-installation (such as Hyper-V and WSL) and disable unwanted and outdated ones, like PowerShell 2.0. At this stage, you can also fully disable the Recall feature, although it is disabled by default and only offered on computers with ARM processors and an NPU.

One of the most commonly used adaptations was configuring UAC and responding to OOBE questions. Today, however, applying these settings is discouraged, and therefore UAC should be configured immediately after installation. However, you can configure the Taskbar and Updates, and also add a local administrative user, which means you won't need to work on a Microsoft account with administrative privileges.

Since entering a product key is no longer necessary, there's no need to enable unattended settings. However, if you wish to add a key just in case, as well as configure keyboard layouts and language, it will be necessary. After completing all of the above steps, you can proceed to the Apply section and reduce the image by removing unused editions; it is recommended to leave Boot and WinRE images intact. Selecting "Create ISO" will give you, in about fifteen minutes, your customized installation image.

What to do with such an image?

Such an image can't be applied by the Media Creation Tool anymore. In this case, you need to use the Rufus program. It prepares an installer compatible with UEFI, bypasses the need to split the WIM file into parts by smartly manipulating partitions, and allows you to apply workarounds for TPM and Microsoft account requirements. These may, however, be in conflict with settings applied by NTLite.

In conclusion, it's worth noting that if the laptop manufacturer provides its recovery and reinstallation mechanism, it might be worth using and not formatting the drive. The era of manufacturer bloatware has ended—built-in recovery partitions use the same tools and imaging mechanisms as the actual installer, while also containing an integrated set of drivers adapted to the hardware.

Related content
© essanews.com
·

Downloading, reproduction, storage, or any other use of content available on this website—regardless of its nature and form of expression (in particular, but not limited to verbal, verbal-musical, musical, audiovisual, audio, textual, graphic, and the data and information contained therein, databases and the data contained therein) and its form (e.g., literary, journalistic, scientific, cartographic, computer programs, visual arts, photographic)—requires prior and explicit consent from Wirtualna Polska Media Spółka Akcyjna, headquartered in Warsaw, the owner of this website, regardless of the method of exploration and the technique used (manual or automated, including the use of machine learning or artificial intelligence programs). The above restriction does not apply solely to facilitate their search by internet search engines and uses within contractual relations or permitted use as specified by applicable law.Detailed information regarding this notice can be found  here.