Skip to content

Releases: 01101010110/MODWIN

V6

05 Jan 20:51
5847806
Compare
Choose a tag to compare

Hey guys! MODWIN has been updated to V6.

The main focus for this update was to provide Unattended installation support. MODWIN provides support by adding an unattend file to your iso. The unattend file does not include system language options due to languages not being changeable. What language you select during media creation is what you are stuck with, so the default answer file in MODWIN works on all languages of Windows despite there being some English language options in the script. These options cannot be removed either, or the unattend file will not work right and halt the setup midway through.

I included some sources below, but a TLDR is I made a script that combines some of the gist code listed below and some of the windowsafg code and some code I added. This script will automatically install Windows for us without a touch. (English only is without a touch, all other versions require a single click unfortunately). The auto install script automatically includes a TPM fix, too, for those that need.

Here is a video showing the new unattend option. Only works with Windows 10 and 11 home and pro. You can select any username and password. It also shows the autounattend file working on various international distros.
https://www.youtube.com/watch?v=wgRW3NEegRU

If you want to turn off the auto-login feature, after Windows has installed, open CMD and run this code:
reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /f

I ran these steps on a cheapo laptop that clearly does not meet Win 11 requirements, and was able to install Windows 11 successfully without any user intervention.

(NOT AFFILIATED, JUST FOR CONTEXT)
https://www.amazon.com/dp/B0BS3WHQ4F?ref=ppx_yo2ov_dt_b_product_details&th=1

SOURCES:

How to Create an Unattended Installation of Windows 10
https://www.youtube.com/watch?v=r9QyCOvZwSA
https://www.windowsafg.com/

The old-fashioned normal way:

How to create Windows Answer Files for Unattended Installations
https://www.youtube.com/watch?v=9Bw-03tzjwI

Adk
https://learn.microsoft.com/en-us/windows-hardware/get-started/adk-install#download-the-adk-101253981-september-2023

This gist daisy chains the answer file to a tpm bypass script if you ever wondered how to do that
https://gist.github.com/asheroto/c4a9fb4e5e5bdad10bcb831e3a3daee6

V5

04 Dec 15:38
88a9c60
Compare
Choose a tag to compare
V5

MODWIN V5
A remove all packages option has been added that is able to check the packages loaded on any wim and then it prints a “safe” list that will automatically remove each of these packages for us.

Microsoft-OneCore-ApplicationModel
Microsoft-OneCore-DirectX
Microsoft-Windows-Hello
Microsoft-Windows-InternetExplorer
Microsoft-Windows-LanguageFeatures-Handwriting
Microsoft-Windows-LanguageFeatures-OCR
Microsoft-Windows-LanguageFeatures-Speech
Microsoft-Windows-LanguageFeatures-TextToSpeech
Microsoft-Windows-MSPaint
Microsoft-Windows-MediaPlayer
Microsoft-Windows-PowerShell
Microsoft-Windows-Printing
Microsoft-Windows-QuickAssist
Microsoft-Windows-StepsRecorder
Microsoft-Windows-TabletPCMath
Microsoft-Windows-WMIC
Microsoft-Windows-Wallpaper
Microsoft-Windows-WordPad
OpenSSH-Client-Package

You may notice where dism will display an error message for packages like InternetExplorer, mediaPlayer, and others on the first attempt at removal. This is due to MODWIN printing all packages to the “safe” list with the names shown above. All the wims extracted from any iso Microsoft or UUPDUMP have extra packages with the same names, just different numbers, for reasons I am unsure of. In regular windows 10 and 11 images, you will only see the error once, as the correct package is the second in the list. However on Windows ARM images you will see the error a couple of times until it reaches the correct option that is uninstallable. I am unsure how to make this any simpler so if someone does find a simpler way for the safe autoextraction mechanism, do let me know! Either way, the performance is faster than human so I hope it helps.

A remove all features option has been added that runs without any errors. Note it does exactly what it says and will turn off the defender functionality so if you wish to retain that, turn it back on. The remove all packages option keeps defender support out of personal preference to keep general users safer. This is explained in the new simplified “safe” packages list on github. https://github.com/01101010110/MODWIN/blob/main/%22SAFE%22%20PACKAGES

The manual remove features and enable features menus were cleaned up so they don’t produce any additional text anymore, just features.

The build iso code was fixed, I had the wrong iso level, it needed 3 for large file support, so now arm isos will build correctly, and theoretically you should be able to make iso images as big as you want (needs testing). I did a smaller stress test by mounting the wim and then shot over 2 different windows isos in the USER folder and built the iso as an uncompressed wim and it built successfully. The disk was 15gb in file size and setup in vmware with both isos showing in the C:\ after setup finished.

That being said I am tired of manually installing windows so I’ll try to get unattended support added in the next update. Will probably be a few weeks before I get that version, v6 out, need to update a few other projects on here first.

V4

21 Nov 15:19
4fa1424
Compare
Choose a tag to compare
V4

Note that the build iso function in V4 will not work for ARM images atm, I will fix that in the next release. 4.1 is being worked on

CHANGE LOG:

The entire project has been converted to C++. It is still a console app for now with plans for a separate GUI version in the future.

The project is now a standalone executable instead of an installer and batch script.
Since there is no installer, MODWIN will now run a check before initializing the main menu to see if C:/MODWIN exists. If it does not, MODWIN will automatically build all the needed files and folders, then open File Explorer to C:/MODWIN/ISO so you can paste your copied ISO files into the folder. This will be default behavior, so you can pre-emptively have your Windows ISO copied and when you run MODWIN, it will open file manager to the ISO page for you to simply paste in your files.

The project is being moved away from using oscdimg so we don’t upset Microsoft. The open-source binary “xorisso” is being used now with Cygwin libraries to run the binary. The new binary and libraries are bundled into the executable and the Xorisso Project’s Github page is linked below. I’ve also gone into detail in the source notes below how I used a program to turn xorisso and it’s libraries into an array so it could be bundled into the program for extraction. I also included some knowledge what this even means as it blew my mind and it may yours too.

Code was added to allow the script to detect if our unpacked windows iso contains an install.esd or an install.wim file, removing the need for the user to dig through their directories, as well as removing the need to type in a number for that entry.
The apps, packages, and features menu option has been removed and now each item has their own entry on the main menu because I don’t know why I did that to begin with, haha. These menus are all much more functional, clean, and easy to use. If you are installing your own APPS, MODWIN can read from the APPS folder and install all items for you automatically.
The registry editing code is now able to open regedit for us and upon closing regedit, it will unload the hive so you can select your next hive or leave the menu without the extra step of manually unloading the hive.

More error checking code was added to help the program remain functional if items were not in the directories as expected, like a missing ESD or WIM file, which will cause an error code in certain menus and trigger the appropriate response to the user. Choice loops have also been added so the program doesn’t break if user enters anything other than the specified numbers or letters.

The “all-in-one” scripts were removed as I don’t think they are particularly helpful and will instead be posted on github in a text file so one can reference what apps / packages/ and features are “safe” for removal.

A “remove all” function was added into the Application menu that will literally remove all installed apps, which is currently safe, as the three application packages that cannot be removed will not allow themselves to be. This is a function I will watch in future Windows updates, as it may cause trouble later on.

In the future I will add a remove all “safe” packages option in the package menu, it’s just a little hard the logic there but it will be done. Same with the features, all features can be turned off, I just wanted to get a working release out first before I start doing anything more.

“SAFE” Package list
https://github.com/01101010110/MODWIN/blob/main/%22SAFE%22%20PACKAGES
The README on github has been updated so now you don’t have to go to external links to see what to do.

An option 0 has been provided so I can properly thank those who helped to make this project what it is. I have missed some folks on this list but I will update this in the future.

SOURCES AND SOURCE NOTES:

How I learned of xorisso
https://stackoverflow.com/questions/67524729/using-genisoimage-or-mkisofs-on-windows-10

Xorriso Github:
https://github.com/PeyTy/xorriso-exe-for-windows/

A note about the xorriso build commands:
the -b that points to our efi driver doesn’t actually want the full path. It just wants the directions after C:\MODWIN\ISO\ so it can locate the driver. Took me a hot minute to figure this out x.x

A guide on how to use Adguard to download Microsoft application packages if you need
https://www.makeuseof.com/download-microsoft-store-apps-without-microsoft-store/

Adguard’s website
https://store.rg-adguard.net/

Microsoft store’s website
https://apps.microsoft.com/home?hl=en-us&gl=US

Example app Evernote
https://apps.microsoft.com/detail/9WZDNCRFJ3MB?hl=en-us&gl=US

For me, instead of disabling defender like the guide shown above said, I only had to use Microsoft Edge Browser to download my Example app off of adguard.

Second Example App Windows Terminal
https://apps.microsoft.com/detail/windows-terminal/9N0DX20HK701?hl=en-us&gl=US

This link explains why option 2 in PACKAGES isn’t working. Maybe we can find a work around for funsies. Learning about installing Packages through DISM, why most .cab files fail in this process
https://social.technet.microsoft.com/Forums/lync/en-US/683d7d72-b296-419f-b585-becd5d99b37f/dism-offline-update-error-0x80070002?forum=w7itproinstall

To add packages:
https://www.catalog.update.microsoft.com/home.aspx

To build MODWIN and test it easily I used:

Visual Studio (Community Edition)
https://visualstudio.microsoft.com/

To compile modwin I used:
https://www.msys2.org/

mysys code:
pacman -Syu
pacman -S mingw-w64-x86_64-gcc
cd /c/path/to/your/project
for me this was (msys operates like linux):
cd /c/Users/0110/Desktop/Programming/Mod1/modwin/modwin

g++ -static program.c -o program
for me this was:
g++ -static modwin.cpp -o MODWIN

Create an Icon File
https://image.online-convert.com/convert-to-ico

Create a Resource Script, Requires Msys2
https://www.msys2.org/

Change directory to your project path (Example):
cd /c/Users/0110/Desktop/Programming/Mod1/modwin/modwin

nano appicon.rc

Write this line:
IDI_MYICON ICON "modwin.ico"

Then press ctrl +x to exit and press y to save

Run this command:
windres appicon.rc -O coff -o appicon.res

When compiling your application, link the resource object file with it. Replace your_program.cpp with the name of your C++ source file:

g++ -static -lstdc++fs -std=c++17 modwin.cpp appicon.res -o MODWIN.exe

To take all the files needed to run xorriso and compile them into an array, in msys:

pacman -S vim
Vim is needed because it contains xxd. Now run:

xxd -i .gitignore > .gitignore.h
xxd -i LICENSE > LICENSE.h
xxd -i README.md > README_md.h
xxd -i cygiconv-2.dll > cygiconv_2_dll.h
xxd -i cygwin1.dll > cygwin1_dll.h
xxd -i resources.rc > resources_rc.h
xxd -i xorriso.exe > xorriso_exe.h

To solve compilation issues in Windows I found this stackoverflow thread that showed to add -static to the code
https://stackoverflow.com/questions/6404636/libstdc-6-dll-not-found

What is an Array?
In programming, an array is a collection of elements (like numbers or characters) that are stored in memory in a sequence. You can think of an array as a row of boxes, where each box can hold a piece of data, and each box has a number so you can find it again (this number is called the index).

How Does Converting a File to an Array Work?

  1. Turning a File into Hexadecimal Representation: Every file on your computer, whether it's an image, a document, or an executable, is stored as a series of bytes. A byte is a basic unit of storage and represents a small amount of data. In programming, we often use hexadecimal (hex) notation to represent these bytes because it's more compact.
  2. Hex to C Array: The tool xxd -i takes a file and converts each byte of the file into a hexadecimal representation, then puts these hex values into a C-style array. For example, if your file was just the two letters 'OK', it might turn into something like unsigned char embeddedFile[] = {0x4F, 0x4B}; in C language, where 0x4F and 0x4B are hexadecimal representations of 'O' and 'K'.
    What About the Executable?
    When you're embedding a file into your C++ program, you're not including the executable itself in your project. Instead, you're taking a different file (like an image or another program) and converting it into a format (a C array) that you can include in your C++ source code.
    How Does This Remove the Need for the Original File?
    When you compile your C++ program with this embedded file, the file's data becomes part of your program's executable. So, when you run the executable, it already contains the data of the file you embedded. Your program can then create a new file on the user's computer and write this data into it, effectively recreating the original file.
    Example Scenario
    Imagine you have a program that needs to display a specific image. Instead of distributing the image separately and having your program load it from the user's file system, you embed the image into your program. When the user runs your program, it creates the image file right there on their computer, using the data embedded in the program. This way, you don't need to worry about the image file being missing or in the wrong place because it's already part of your program.
    This method is helpful for making sure your program has everything it needs to run, without relying on external files that might get lost or misplaced. However, it does make your program larger because it now contains the additional data of the files you embedded.

V3.2

27 Mar 16:34
43b5479
Compare
Choose a tag to compare

This update corrects a problem some of us are having where dism spit out blank app.txt files and therefore would not populate the apps, packages, or features on screen for us to be able to remove. Full explanation can be found here: https://forum.xda-developers.com/t/modwin-a-tool-for-inspecting-modifying-and-building-lite-isos.4509153/post-88340401

V3.1

23 Mar 10:57
71c5736
Compare
Choose a tag to compare

The missing code was added to fix the iso building step. Thanks to user indospot on xda for pointing out the missing -b from the build code here https://forum.xda-developers.com/t/modwin-a-tool-for-inspecting-modifying-and-building-lite-isos.4509153/post-88322649

A fully Executable Version of MODWIN

23 Nov 06:32
13b14fe
Compare
Choose a tag to compare

This is just a demo https://www.youtube.com/watch?v=Cq6eZyKtC5g I am too tired to do a talk through on the code maybe tomorrow. Keep an eye on XDA https://forum.xda-developers.com/t/modwin-a-tool-for-inspecting-modifying-and-building-lite-isos.4509153/ All you need is the MODWIN.EXE

I am a github noob and idk how to delete the other stuff.

V3

15 Jan 21:08
13b14fe
Compare
Choose a tag to compare

v1.0.0

17 Nov 17:24
13b14fe
Compare
Choose a tag to compare

The first official release, looking for more testing. I personally built 6 different ISOs and booted them in VMware to the production Phase to ensure the scripts are all fully functional now. If you notice any errors please report them! Please add any suggestions and anyone good with GUIs please Fork this!