Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files.

Overview

WindowsBuildFromISO

Extract the windows major and minor build numbers from an ISO file, and automatically sort the iso files.

GitHub release (latest by date)

Features

  • Parse multiple ISO files from a directory.
  • Detect the Windows build number and OS language.
  • Sort and rename the ISO files in folders by OS major and minor builds.

Examples

  • Automatically sort and rename the isos from a directory by major and minor build numbers.

    ./WindowsBuildFromISO.py --iso-dir ./isos/ --archive-dir ./archive/
    
  • Only get the major and minor build numbers of an ISO.

    ./WindowsBuildFromISO.py --iso ./isos/Win10_21H1_x64_English.iso
    

Usage

$ ./WindowsBuildFromISO.py -h
usage: WindowsBuildFromISO.py [-h] (-i ISO | -d ISO_DIR) [-a ARCHIVE_DIR] [-v]

Extract Windows Build number from ISO files. v1.1

optional arguments:
  -h, --help            show this help message and exit
  -i ISO, --iso ISO     Path to iso file.
  -d ISO_DIR, --iso-dir ISO_DIR
                        Directory containing multiple ISOs to parse.
  -a ARCHIVE_DIR, --archive-dir ARCHIVE_DIR
                        Archive dir. (default: False)
  -v, --verbose         Verbose mode. (default: False)

How it works

In order to extract the Windows version from an ISO, we first need to mount the ISO file and open its content. In the ISO, there is a ./sources/ folder containing a Windows imaging (WIM) image in ./sources/boot.wim. When we uncompress this archive, we get a lot of files, but one file at the root of the archive stands out: '[1].xml'.

boot$ ls -lha
total 52K
drwxrwxr-x 5 podalirius podalirius 4,0K janv. 18 00:17  .
drwxrwxr-x 4 podalirius podalirius 4,0K janv. 18 00:17  ..
drwx------ 8 podalirius podalirius 4,0K mars  19  2019  1
-rw-rw-r-- 1 podalirius podalirius 3,9K janv. 18 00:16 '[1].xml'
drwx------ 8 podalirius podalirius 4,0K mars  19  2019  2
drwx------ 2 podalirius podalirius  32K janv. 18 00:16 '[DELETED]'

This file is a XML file containing information about the images contained inside the ./sources/boot.wim file. It contains all the information we need to know which major or minor build this ISO file is. Here is an extract of the '[1].xml' file:

... 9 Microsoft� Windows� Operating System WindowsPE WindowsPE WinNT en-US en-US 10 0 18362 418 0 19h1_release WINDOWS Microsoft Windows PE (x64) Microsoft Windows PE (x64) 9 ... ">
<WIM>
    <TOTALBYTES>530731284TOTALBYTES>
    <IMAGE INDEX="1">
        ...
        <WINDOWS>
            <ARCH>9ARCH>
            <PRODUCTNAME>Microsoft� Windows� Operating SystemPRODUCTNAME>
            <EDITIONID>WindowsPEEDITIONID>
            <INSTALLATIONTYPE>WindowsPEINSTALLATIONTYPE>
            <PRODUCTTYPE>WinNTPRODUCTTYPE>
            <PRODUCTSUITE>PRODUCTSUITE>
            <LANGUAGES>
                <LANGUAGE>en-USLANGUAGE>
                <DEFAULT>en-USDEFAULT>
            LANGUAGES>
            <VERSION>
                <MAJOR>10MAJOR>
                <MINOR>0MINOR>
                <BUILD>18362BUILD>
                <SPBUILD>418SPBUILD>
                <SPLEVEL>0SPLEVEL>
                <BRANCH>19h1_releaseBRANCH>
            VERSION>
            <SYSTEMROOT>WINDOWSSYSTEMROOT>
        WINDOWS>
        <NAME>Microsoft Windows PE (x64)NAME>
        <DESCRIPTION>Microsoft Windows PE (x64)DESCRIPTION>
        <FLAGS>9FLAGS>
    IMAGE>
    ...
WIM>

Contributing

Pull requests are welcome. Feel free to open an issue if you want to add other features.

You might also like...
A simple Python code that takes input from a csv file and makes it into a vcf file.

Contacts-Maker A simple Python code that takes input from a csv file and makes it into a vcf file. Imagine a college or a large community where each y

gitfs is a FUSE file system that fully integrates with git - Version controlled file system

gitfs is a FUSE file system that fully integrates with git. You can mount a remote repository's branch locally, and any subsequent changes made to the files will be automatically committed to the remote.

Small-File-Explorer - I coded a small file explorer with several options
Small-File-Explorer - I coded a small file explorer with several options

Petit explorateur de fichier / Small file explorer Pour la première option (création de répertoire) / For the first option (creation of a directory) e

Pti-file-format - Reverse engineering the Polyend Tracker instrument file format

pti-file-format Reverse engineering the Polyend Tracker instrument file format.

Generates a clean .txt file of contents of a 3 lined csv file

Generates a clean .txt file of contents of a 3 lined csv file. File contents is the .gml file of some function which stores the contents of the csv as a map.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.
PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

File-manager - A basic file manager, written in Python

File Manager A basic file manager, written in Python. Installation Install Pytho

Two scripts help you to convert csv file to md file by template

Two scripts help you to convert csv file to md file by template. One help you generate multiple md files with different filenames from the first colume of csv file. Another can generate one md file with several blocks.

MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts.

SaveTools MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts. Credits Written by Asteris

Comments
  • Find where the common OS name is inside the ISO

    Find where the common OS name is inside the ISO

    For example "Windows server 2016" should be here instead of "Windows 10.0" :

    [iso] ./archive/Windows 10.0/10.0.14393.0 - Windows 10.0/en-us/10.0.14393.0.Windows_Server_2016_Datacenter.en-us.iso 
       [+] Windows 10.0 (build:14393.0)  (lang:en-us)
    
    enhancement 
    opened by p0dalirius 1
Releases(1.2)
Owner
Podalirius
Hacker of everything
Podalirius
A wrapper for DVD file structure and ISO files.

vs-parsedvd DVDs were an error. A wrapper for DVD file structure and ISO files. You can find me in the IEW Discord server

null 7 Nov 17, 2022
Extract an archive file (zip file or tar file) stored on AWS S3

S3 Extract Extract an archive file (zip file or tar file) stored on AWS S3. Details Downloads archive from S3 into memory, then extract and re-upload

Evan 1 Dec 14, 2021
Search for files under the specified directory. Extract the file name and file path and import them as data.

Search for files under the specified directory. Extract the file name and file path and import them as data. Based on that, search for the file, select it and open it.

G-jon FujiYama 2 Jan 10, 2022
Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

laojunjun 13 Nov 23, 2022
This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that have that extension.

FileBulk This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that h

Enoc Mena 1 Jun 26, 2022
Python function to stream unzip all the files in a ZIP archive: without loading the entire ZIP file or any of its files into memory at once

Python function to stream unzip all the files in a ZIP archive: without loading the entire ZIP file or any of its files into memory at once

Department for International Trade 206 Jan 2, 2023
Add Ranges and page numbers to IIIF Manifest from a CSV.

Add Ranges and page numbers to IIIF Manifest from CSV specific to a workflow of the Bibliotheca Hertziana.

Raffaele Viglianti 3 Apr 28, 2022
Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

null 3 Feb 9, 2022
A python script to convert an ucompressed Gnucash XML file to a text file for Ledger and hledger.

README 1 gnucash2ledger gnucash2ledger is a Python script based on the Github Gist by nonducor (nonducor/gcash2ledger.py). This Python script will tak

Thomas Freeman 0 Jan 28, 2022
Python package to read and display segregated file names present in a directory based on type of the file

tpyfilestructure Python package to read and display segregated file names present in a directory based on type of the file. Installation You can insta

Tharun Kumar T 2 Nov 28, 2021