Compare commits
73 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 35baeb90a0 | |||
| 49dcd1b591 | |||
| dec57a596e | |||
| d709995bf8 | |||
| d7f2c6d4d4 | |||
| 2f3d125360 | |||
| d0e336d0a2 | |||
| 6a58f48ed0 | |||
|
|
af69a48265 | ||
|
|
1175178bf6 | ||
|
|
9ca84542f3 | ||
|
|
71e1e30e5e | ||
|
|
9b70166776 | ||
|
|
8c1a8d1045 | ||
|
|
5ca27c740e | ||
|
|
a5a4d97994 | ||
|
|
d53ba61bd4 | ||
|
|
3ef0c7efd9 | ||
|
|
bba078c34b | ||
|
|
1fe45e2e80 | ||
|
|
233b6b0fc4 | ||
|
|
5153812f23 | ||
|
|
48714d253f | ||
|
|
7ec6a7c253 | ||
|
|
9d9e51758a | ||
|
|
e51044f5af | ||
|
|
af2e6159d0 | ||
|
|
eeb3c580e2 | ||
|
|
427e6af437 | ||
|
|
fb59b449b2 | ||
|
|
cd8b9a74f4 | ||
|
|
27a7f54e6a | ||
|
|
8f43660267 | ||
|
|
e618386dbd | ||
|
|
47ef9128b8 | ||
|
|
f762e66aff | ||
|
|
5dc7bdce49 | ||
|
|
218e141897 | ||
|
|
08eb2ff741 | ||
|
|
e8327ffa5f | ||
|
|
d33975d91b | ||
|
|
d475687923 | ||
|
|
d014d0119e | ||
|
|
8158c07cd9 | ||
|
|
fd1aa7dd61 | ||
|
|
dbaa1db7a9 | ||
|
|
501e10c1ad | ||
|
|
93eb664e56 | ||
|
|
dcb2c27332 | ||
|
|
77c74f524d | ||
|
|
b277eb1019 | ||
|
|
aa81dfc0d4 | ||
|
|
98014c0b2a | ||
|
|
a543bd256d | ||
|
|
63b44e4e03 | ||
|
|
4bc8256469 | ||
|
|
7edad858a8 | ||
|
|
ef962c2885 | ||
|
|
d4ae03fe49 | ||
|
|
4953ad860b | ||
|
|
62db46658f | ||
|
|
c91daeadaf | ||
|
|
643b85f5a6 | ||
|
|
d2a50a9d69 | ||
|
|
beab8214d5 | ||
|
|
3c72acf1f1 | ||
|
|
c2679204e0 | ||
|
|
491145ce4c | ||
|
|
de24916ffc | ||
|
|
c7001dc2d2 | ||
|
|
6ce347e6f9 | ||
|
|
78efe85975 | ||
|
|
f0a96c7eb3 |
9 changed files with 718 additions and 787 deletions
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
github: [0n1cOn3]
|
||||
|
||||
# Add custom links to support your work
|
||||
custom: ['https://paypal.me/StefanKuny']
|
||||
22
Dockerfile
Normal file
22
Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Use Windows Server Core as base image
|
||||
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
||||
|
||||
# Define environment variables matching script paths
|
||||
ENV ISO_MOUNT="C:\\ISOMount" `
|
||||
OUTPUT_PATH="C:\\Tiny11_Output"
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir $ISO_MOUNT $OUTPUT_PATH
|
||||
|
||||
# Copy the PowerShell script into the container
|
||||
COPY install_tiny11.ps1 C:\install_tiny11.ps1
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR C:\
|
||||
|
||||
# Set execution policy for scripts
|
||||
SHELL ["powershell", "-Command"]
|
||||
RUN Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
|
||||
|
||||
# Define entrypoint for running the script
|
||||
ENTRYPOINT ["powershell.exe", "-File", "C:\\install_tiny11.ps1", "-OutputPath", "C:\\Tiny11_Output"]
|
||||
581
Elevenbuilder.ps1
Normal file
581
Elevenbuilder.ps1
Normal file
|
|
@ -0,0 +1,581 @@
|
|||
<#
|
||||
.SYNOPSIS
|
||||
Tiny11 Image Creator – Full Workflow (ISO Download, Mount, Customization, and ISO Creation)
|
||||
|
||||
.DESCRIPTION
|
||||
This script uses DISM and other tools to create a customized Windows 11 image.
|
||||
It now supports obtaining the Windows 11 ISO from a user-supplied path or by auto‑downloading
|
||||
(using massgrave.dev as the source) if no ISO is provided. The ISO is then mounted and assigned
|
||||
a free drive letter. The script then copies installation files, processes install.wim and boot.wim,
|
||||
applies registry tweaks and removals, and finally creates an ISO using oscdimg.exe.
|
||||
|
||||
.PARAMETER ScratchDisk
|
||||
A drive letter (e.g. "D") or path where the working files will be stored.
|
||||
|
||||
.PARAMETER ISOPath
|
||||
(Optional) Full path to a Windows 11 ISO file. If not provided, the script will prompt for
|
||||
the desired language and auto‑download the ISO.
|
||||
|
||||
.PARAMETER Language
|
||||
(Optional) Desired language code for the ISO download (e.g. "en-US", "de-DE"). Only used if ISOPath is not provided.
|
||||
|
||||
.NOTES
|
||||
- This script requires administrative privileges.
|
||||
- It assumes that your original workflow (registry tweaks, application removals, etc.) must remain intact.
|
||||
- Some API endpoints (for downloading the ISO) are hypothetical and may need adjustment.
|
||||
#>
|
||||
|
||||
param (
|
||||
[ValidatePattern('^[c-zC-Z]$')]
|
||||
[string]$ScratchDisk,
|
||||
[string]$ISOPath, # Full path to a Windows 11 ISO (optional)
|
||||
[string]$Language # Desired language code (e.g., "en-US", "de-DE")
|
||||
)
|
||||
|
||||
#region Helper Functions (ISO download and mount)
|
||||
|
||||
function Get-Win11DownloadLink {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Queries the API (via massgrave.dev) for the proper ISO download link.
|
||||
.PARAMETER Language
|
||||
The desired language code.
|
||||
.OUTPUTS
|
||||
The download URL as a string.
|
||||
#>
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Language
|
||||
)
|
||||
# Adjust the endpoint and parameters as required.
|
||||
$apiBase = "https://api.gravesoft.dev/msdl/"
|
||||
$endpoint = "getDownloadLink" # Hypothetical endpoint.
|
||||
$url = "$apiBase$endpoint?language=$Language"
|
||||
|
||||
Write-Host "Querying download link for Windows 11 ISO for language: $Language" -ForegroundColor Cyan
|
||||
try {
|
||||
$response = Invoke-RestMethod -Uri $url -Method Get
|
||||
if ($response -and $response.downloadUrl) {
|
||||
Write-Host "Download URL obtained: $($response.downloadUrl)" -ForegroundColor Green
|
||||
return $response.downloadUrl
|
||||
}
|
||||
else {
|
||||
Write-Error "API did not return a valid download URL."
|
||||
return $null
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Error "Error calling the download API: $_"
|
||||
return $null
|
||||
}
|
||||
}
|
||||
|
||||
function Get-Windows11ISO {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Returns the path to a Windows 11 ISO. If a valid ISOPath is provided, that file is used.
|
||||
Otherwise, prompts (or uses the provided language) and downloads the ISO.
|
||||
.PARAMETER ISOPath
|
||||
User-supplied ISO path.
|
||||
.PARAMETER Language
|
||||
Desired language code.
|
||||
.OUTPUTS
|
||||
The full path to the Windows 11 ISO.
|
||||
#>
|
||||
param(
|
||||
[string]$ISOPath,
|
||||
[string]$Language
|
||||
)
|
||||
# Use provided ISO if valid
|
||||
if ($ISOPath -and (Test-Path $ISOPath -PathType Leaf)) {
|
||||
Write-Host "Using provided ISO: $ISOPath" -ForegroundColor Green
|
||||
return $ISOPath
|
||||
}
|
||||
|
||||
# If no ISO path, prompt for language (if not provided)
|
||||
if (-not $Language) {
|
||||
$Language = Read-Host "Enter your desired Windows 11 language (e.g., en-US, de-DE)"
|
||||
}
|
||||
|
||||
$downloadLink = Get-Win11DownloadLink -Language $Language
|
||||
if (-not $downloadLink) {
|
||||
Write-Error "Could not retrieve a valid download link. Exiting."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$DownloadPath = "$env:TEMP\Windows11_$Language.iso"
|
||||
Write-Host "Downloading Windows 11 ISO from $downloadLink ..." -ForegroundColor Cyan
|
||||
try {
|
||||
Invoke-WebRequest -Uri $downloadLink -OutFile $DownloadPath
|
||||
Write-Host "Download complete: $DownloadPath" -ForegroundColor Green
|
||||
return $DownloadPath
|
||||
}
|
||||
catch {
|
||||
Write-Error "Failed to download the ISO: $_"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
function Mount-ISOAndAssignDriveLetter {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Mounts an ISO image and assigns a free drive letter if none is already assigned.
|
||||
.PARAMETER ISOPath
|
||||
The full path to the ISO file.
|
||||
.OUTPUTS
|
||||
The drive letter (e.g., "E:") where the ISO is mounted.
|
||||
#>
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$ISOPath
|
||||
)
|
||||
if (-not (Test-Path $ISOPath)) {
|
||||
Write-Error "The ISO file '$ISOPath' does not exist."
|
||||
return
|
||||
}
|
||||
|
||||
Write-Host "Mounting ISO image: $ISOPath" -ForegroundColor Cyan
|
||||
$mountedImage = Mount-DiskImage -ImagePath $ISOPath -PassThru
|
||||
if (-not $mountedImage) {
|
||||
Write-Error "Failed to mount ISO image."
|
||||
return
|
||||
}
|
||||
Start-Sleep -Seconds 3 # Wait for the volume to become available
|
||||
|
||||
$diskImage = Get-DiskImage -ImagePath $ISOPath
|
||||
if (-not $diskImage) {
|
||||
Write-Error "Unable to retrieve disk image information."
|
||||
return
|
||||
}
|
||||
$disk = $diskImage | Get-Disk
|
||||
if (-not $disk) {
|
||||
Write-Error "Unable to retrieve disk information for the mounted image."
|
||||
return
|
||||
}
|
||||
$diskNumber = $disk.Number
|
||||
|
||||
# Retrieve the first partition (most ISOs contain a single partition)
|
||||
$partition = Get-Partition -DiskNumber $diskNumber | Select-Object -First 1
|
||||
if (-not $partition) {
|
||||
Write-Error "No partition found on the mounted ISO."
|
||||
return
|
||||
}
|
||||
|
||||
# If no drive letter is assigned, choose a free one (from C: to Z:)
|
||||
if (-not $partition.DriveLetter) {
|
||||
$freeLetters = [char[]](67..90) | ForEach-Object { [char]$_ }
|
||||
$usedLetters = (Get-Volume | Where-Object { $_.DriveLetter } | Select-Object -ExpandProperty DriveLetter)
|
||||
$availableLetters = $freeLetters | Where-Object { $usedLetters -notcontains $_ }
|
||||
if ($availableLetters.Count -eq 0) {
|
||||
Write-Error "No free drive letters available."
|
||||
return
|
||||
}
|
||||
$freeLetter = $availableLetters | Select-Object -First 1
|
||||
Write-Host "Assigning drive letter '$freeLetter' to the mounted ISO." -ForegroundColor Yellow
|
||||
Set-Partition -DiskNumber $diskNumber -PartitionNumber $partition.PartitionNumber -NewDriveLetter $freeLetter
|
||||
$driveLetter = "$freeLetter`:"
|
||||
}
|
||||
else {
|
||||
$driveLetter = "$($partition.DriveLetter):"
|
||||
}
|
||||
|
||||
Write-Host "ISO mounted at drive letter: $driveLetter" -ForegroundColor Green
|
||||
return $driveLetter
|
||||
}
|
||||
|
||||
#endregion Helper Functions
|
||||
|
||||
#region Environment Setup
|
||||
|
||||
function Setup-Environment {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Performs pre-flight checks, sets the scratch disk, adjusts execution policy,
|
||||
ensures admin rights, starts logging, and creates necessary directories.
|
||||
#>
|
||||
# Set ScratchDisk (if not provided, use the script folder)
|
||||
if (-not $ScratchDisk) {
|
||||
$global:ScratchDisk = $PSScriptRoot.TrimEnd('\')
|
||||
} else {
|
||||
$global:ScratchDisk = "$ScratchDisk`:" # Append colon if needed.
|
||||
}
|
||||
Write-Output "Scratch disk set to $global:ScratchDisk"
|
||||
|
||||
# Check and adjust execution policy
|
||||
if ((Get-ExecutionPolicy) -eq 'Restricted') {
|
||||
Write-Host "Your current PowerShell Execution Policy is 'Restricted'. Changing it to 'RemoteSigned'..."
|
||||
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm:$false
|
||||
}
|
||||
|
||||
# Ensure script is running as administrator
|
||||
$adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
|
||||
$principal = New-Object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())
|
||||
if (-not $principal.IsInRole($adminRole)) {
|
||||
Write-Host "Restarting the script with elevated privileges..."
|
||||
$arguments = "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`""
|
||||
Start-Process powershell -Verb RunAs -ArgumentList $arguments
|
||||
exit
|
||||
}
|
||||
|
||||
# Start logging and set window title
|
||||
Start-Transcript -Path "$global:ScratchDisk\tiny11.log"
|
||||
$Host.UI.RawUI.WindowTitle = "Tiny11 Image Creator"
|
||||
Clear-Host
|
||||
Write-Host "Welcome to the Tiny11 Image Creator! Release: 05-06-24" -ForegroundColor Cyan
|
||||
|
||||
# Create required directories
|
||||
$global:tiny11Folder = Join-Path $global:ScratchDisk "tiny11"
|
||||
$global:sourcesFolder = Join-Path $global:tiny11Folder "sources"
|
||||
$global:mountPath = Join-Path $global:ScratchDisk "scratchdir"
|
||||
New-Item -ItemType Directory -Force -Path $global:sourcesFolder | Out-Null
|
||||
New-Item -ItemType Directory -Force -Path $global:mountPath | Out-Null
|
||||
}
|
||||
|
||||
#endregion Environment Setup
|
||||
|
||||
#region Obtain & Mount Installation Media
|
||||
|
||||
function Get-InstallationMedia {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Obtains the Windows 11 ISO (using a provided path or by downloading it) and mounts it.
|
||||
.OUTPUTS
|
||||
The drive letter where the installation media is mounted.
|
||||
#>
|
||||
# Get the ISO (download if necessary)
|
||||
$global:win11ISO = Get-Windows11ISO -ISOPath $ISOPath -Language $Language
|
||||
if (-not $global:win11ISO) {
|
||||
Write-Error "Failed to obtain a Windows 11 ISO. Exiting."
|
||||
exit
|
||||
}
|
||||
|
||||
# Mount the ISO and retrieve the drive letter
|
||||
$mediaDrive = Mount-ISOAndAssignDriveLetter -ISOPath $global:win11ISO
|
||||
if (-not $mediaDrive) {
|
||||
Write-Error "Failed to mount the Windows 11 ISO. Exiting."
|
||||
exit
|
||||
}
|
||||
Write-Output "Installation media mounted at: $mediaDrive"
|
||||
return $mediaDrive
|
||||
}
|
||||
|
||||
#endregion Obtain & Mount Installation Media
|
||||
|
||||
#region Process install.wim Image
|
||||
|
||||
function Process-InstallImage {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Processes the Windows installation image (install.wim). This includes:
|
||||
- Validating that the necessary installation files exist (or converting install.esd)
|
||||
- Copying installation files from the installation media to the working folder
|
||||
- Mounting the install.wim, gathering image information, applying customizations,
|
||||
removing apps, tweaking registries, and finally unmounting the image.
|
||||
#>
|
||||
param(
|
||||
[string]$DriveLetter # Installation media drive letter
|
||||
)
|
||||
|
||||
# Validate Windows installation files
|
||||
if ((Test-Path "$DriveLetter\sources\boot.wim") -eq $false -or (Test-Path "$DriveLetter\sources\install.wim") -eq $false) {
|
||||
if (Test-Path "$DriveLetter\sources\install.esd") {
|
||||
Write-Host "Found install.esd, converting to install.wim..."
|
||||
Get-WindowsImage -ImagePath "$DriveLetter\sources\install.esd"
|
||||
$index = Read-Host "Please enter the image index to convert from install.esd"
|
||||
Write-Host "Converting install.esd to install.wim. This may take a while..."
|
||||
Export-WindowsImage -SourceImagePath "$DriveLetter\sources\install.esd" `
|
||||
-SourceIndex $index `
|
||||
-DestinationImagePath "$global:ScratchDisk\tiny11\sources\install.wim" `
|
||||
-CompressionType Maximum -CheckIntegrity
|
||||
} else {
|
||||
Write-Host "Cannot find Windows OS installation files on the installation media."
|
||||
exit
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "Copying Windows installation files from $DriveLetter..."
|
||||
Copy-Item -Path "$DriveLetter\*" -Destination "$global:tiny11Folder" -Recurse -Force | Out-Null
|
||||
# Remove install.esd if present
|
||||
Set-ItemProperty -Path "$global:tiny11Folder\sources\install.esd" -Name IsReadOnly -Value $false -ErrorAction SilentlyContinue
|
||||
Remove-Item "$global:tiny11Folder\sources\install.esd" -ErrorAction SilentlyContinue
|
||||
Write-Host "Copy complete!"
|
||||
}
|
||||
|
||||
Start-Sleep -Seconds 2
|
||||
Clear-Host
|
||||
Write-Host "Retrieving image information from install.wim..."
|
||||
Get-WindowsImage -ImagePath (Join-Path $global:sourcesFolder "install.wim")
|
||||
$index = Read-Host "Please enter the desired image index"
|
||||
Write-Host "Mounting install.wim image. This may take a while..."
|
||||
$global:wimFilePath = Join-Path $global:sourcesFolder "install.wim"
|
||||
& takeown "/F" $global:wimFilePath
|
||||
& icacls $global:wimFilePath "/grant" "$($adminGroup.Value):(F)"
|
||||
try {
|
||||
Set-ItemProperty -Path $global:wimFilePath -Name IsReadOnly -Value $false -ErrorAction Stop
|
||||
} catch {
|
||||
# Suppress errors
|
||||
}
|
||||
New-Item -ItemType Directory -Force -Path $global:mountPath > $null
|
||||
Mount-WindowsImage -ImagePath $global:wimFilePath -Index $index -Path $global:mountPath
|
||||
|
||||
# Retrieve system UI language from the mounted image
|
||||
$imageIntl = & dism /English /Get-Intl "/Image:$global:mountPath"
|
||||
$languageLine = $imageIntl -split '\n' | Where-Object { $_ -match 'Default system UI language : ([a-zA-Z]{2}-[a-zA-Z]{2})' }
|
||||
if ($languageLine) {
|
||||
$languageCode = $Matches[1]
|
||||
Write-Host "Default system UI language code: $languageCode"
|
||||
} else {
|
||||
Write-Host "Default system UI language code not found."
|
||||
}
|
||||
|
||||
# Retrieve architecture information from the image
|
||||
$imageInfo = & dism /English /Get-WimInfo "/wimFile:$global:sourcesFolder\install.wim" "/index:$index"
|
||||
$lines = $imageInfo -split '\r?\n'
|
||||
foreach ($line in $lines) {
|
||||
if ($line -like '*Architecture : *') {
|
||||
$architecture = $line -replace 'Architecture : ',''
|
||||
if ($architecture -eq 'x64') {
|
||||
$architecture = 'amd64'
|
||||
}
|
||||
Write-Host "Architecture: $architecture"
|
||||
break
|
||||
}
|
||||
}
|
||||
if (-not $architecture) {
|
||||
Write-Host "Architecture information not found."
|
||||
}
|
||||
|
||||
Write-Host "Install image mounted. Proceeding with application removals and customizations..."
|
||||
|
||||
# Remove unwanted applications (bloatware) via DISM
|
||||
$packages = & dism /English "/image:$global:mountPath" '/Get-ProvisionedAppxPackages' |
|
||||
ForEach-Object {
|
||||
if ($_ -match 'PackageName : (.*)') {
|
||||
$matches[1]
|
||||
}
|
||||
}
|
||||
$packagePrefixes = 'Clipchamp.Clipchamp_', 'Microsoft.BingNews_', 'Microsoft.BingWeather_', 'Microsoft.GamingApp_', 'Microsoft.GetHelp_', 'Microsoft.Getstarted_', 'Microsoft.MicrosoftOfficeHub_', 'Microsoft.MicrosoftSolitaireCollection_', 'Microsoft.People_', 'Microsoft.PowerAutomateDesktop_', 'Microsoft.Todos_', 'Microsoft.WindowsAlarms_', 'microsoft.windowscommunicationsapps_', 'Microsoft.WindowsFeedbackHub_', 'Microsoft.WindowsMaps_', 'Microsoft.WindowsSoundRecorder_', 'Microsoft.Xbox.TCUI_', 'Microsoft.XboxGamingOverlay_', 'Microsoft.XboxGameOverlay_', 'Microsoft.XboxSpeechToTextOverlay_', 'Microsoft.YourPhone_', 'Microsoft.ZuneMusic_', 'Microsoft.ZuneVideo_', 'MicrosoftCorporationII.MicrosoftFamily_', 'MicrosoftCorporationII.QuickAssist_', 'MicrosoftTeams_', 'Microsoft.549981C3F5F10_'
|
||||
$packagesToRemove = $packages | Where-Object {
|
||||
$packageName = $_
|
||||
$packagePrefixes -contains ($packagePrefixes | Where-Object { $packageName -like "$_*" })
|
||||
}
|
||||
foreach ($package in $packagesToRemove) {
|
||||
& dism /English "/image:$global:mountPath" '/Remove-ProvisionedAppxPackage' "/PackageName:$package"
|
||||
}
|
||||
|
||||
# Remove Microsoft Edge and its components
|
||||
Write-Host "Removing Microsoft Edge..."
|
||||
Remove-Item -Path "$global:mountPath\Program Files (x86)\Microsoft\Edge" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$global:mountPath\Program Files (x86)\Microsoft\EdgeUpdate" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$global:mountPath\Program Files (x86)\Microsoft\EdgeCore" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
if ($architecture -eq 'amd64') {
|
||||
$folderPath = Get-ChildItem -Path "$global:mountPath\Windows\WinSxS" -Filter "amd64_microsoft-edge-webview_31bf3856ad364e35*" -Directory | Select-Object -ExpandProperty FullName
|
||||
if ($folderPath) {
|
||||
& takeown '/f' $folderPath '/r' | Out-Null
|
||||
& icacls $folderPath "/grant" "$($adminGroup.Value):(F)" '/T' '/C' | Out-Null
|
||||
Remove-Item -Path $folderPath -Recurse -Force | Out-Null
|
||||
} else {
|
||||
Write-Host "Edge WebView folder not found."
|
||||
}
|
||||
}
|
||||
elseif ($architecture -eq 'arm64') {
|
||||
$folderPath = Get-ChildItem -Path "$global:mountPath\Windows\WinSxS" -Filter "arm64_microsoft-edge-webview_31bf3856ad364e35*" -Directory | Select-Object -ExpandProperty FullName
|
||||
if ($folderPath) {
|
||||
& takeown '/f' $folderPath '/r' | Out-Null
|
||||
& icacls $folderPath "/grant" "$($adminGroup.Value):(F)" '/T' '/C' | Out-Null
|
||||
Remove-Item -Path $folderPath -Recurse -Force | Out-Null
|
||||
} else {
|
||||
Write-Host "Edge WebView folder not found."
|
||||
}
|
||||
}
|
||||
& takeown '/f' "$global:mountPath\Windows\System32\Microsoft-Edge-Webview" '/r' | Out-Null
|
||||
& icacls "$global:mountPath\Windows\System32\Microsoft-Edge-Webview" '/grant' "$($adminGroup.Value):(F)" '/T' '/C' | Out-Null
|
||||
Remove-Item -Path "$global:mountPath\Windows\System32\Microsoft-Edge-Webview" -Recurse -Force | Out-Null
|
||||
|
||||
# Remove OneDrive
|
||||
Write-Host "Removing OneDrive..."
|
||||
& takeown '/f' "$global:mountPath\Windows\System32\OneDriveSetup.exe" | Out-Null
|
||||
& icacls "$global:mountPath\Windows\System32\OneDriveSetup.exe" '/grant' "$($adminGroup.Value):(F)" '/T' '/C' | Out-Null
|
||||
Remove-Item -Path "$global:mountPath\Windows\System32\OneDriveSetup.exe" -Force | Out-Null
|
||||
Write-Host "Application removal complete!"
|
||||
|
||||
Start-Sleep -Seconds 2
|
||||
Clear-Host
|
||||
|
||||
# Load registry hives from the mounted image and apply tweaks
|
||||
Write-Host "Loading registry hives from the mounted image..."
|
||||
reg load HKLM\zCOMPONENTS "$global:mountPath\Windows\System32\config\COMPONENTS" | Out-Null
|
||||
reg load HKLM\zDEFAULT "$global:mountPath\Windows\System32\config\default" | Out-Null
|
||||
reg load HKLM\zNTUSER "$global:mountPath\Users\Default\ntuser.dat" | Out-Null
|
||||
reg load HKLM\zSOFTWARE "$global:mountPath\Windows\System32\config\SOFTWARE" | Out-Null
|
||||
reg load HKLM\zSYSTEM "$global:mountPath\Windows\System32\config\SYSTEM" | Out-Null
|
||||
|
||||
Write-Host "Applying registry tweaks to bypass system requirements..."
|
||||
& reg add 'HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV1' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV2' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV1' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV2' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassCPUCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassRAMCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassSecureBootCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassStorageCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassTPMCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\MoSetup' '/v' 'AllowUpgradesWithUnsupportedTPMOrCPU' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
|
||||
Write-Host "Registry tweaks complete. Unloading registry hives..."
|
||||
reg unload HKLM\zCOMPONENTS | Out-Null
|
||||
reg unload HKLM\zDEFAULT | Out-Null
|
||||
reg unload HKLM\zNTUSER | Out-Null
|
||||
reg unload HKLM\zSOFTWARE | Out-Null
|
||||
reg unload HKLM\zSYSTEM | Out-Null
|
||||
|
||||
Write-Host "Performing component cleanup on the image..."
|
||||
Repair-WindowsImage -Path $global:mountPath -StartComponentCleanup -ResetBase
|
||||
Write-Host "Unmounting install.wim image (saving changes)..."
|
||||
Dismount-WindowsImage -Path $global:mountPath -Save
|
||||
Clear-Host
|
||||
|
||||
Write-Host "Exporting updated install.wim..."
|
||||
Export-WindowsImage -SourceImagePath (Join-Path $global:sourcesFolder "install.wim") -SourceIndex $index `
|
||||
-DestinationImagePath (Join-Path $global:sourcesFolder "install2.wim") -CompressionType Fast
|
||||
Remove-Item -Path (Join-Path $global:sourcesFolder "install.wim") -Force | Out-Null
|
||||
Rename-Item -Path (Join-Path $global:sourcesFolder "install2.wim") -NewName "install.wim" -Force | Out-Null
|
||||
Write-Host "Install image processing complete. Proceeding with boot.wim..."
|
||||
}
|
||||
|
||||
#endregion Process install.wim Image
|
||||
|
||||
#region Process boot.wim Image
|
||||
|
||||
function Process-BootImage {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Processes the boot image (boot.wim). This includes mounting the boot image,
|
||||
applying necessary tweaks (if any), and then unmounting the image.
|
||||
#>
|
||||
Write-Host "Mounting boot.wim image..."
|
||||
$global:wimFilePath = Join-Path $global:sourcesFolder "boot.wim"
|
||||
& takeown "/F" $global:wimFilePath | Out-Null
|
||||
& icacls $global:wimFilePath "/grant" "$($adminGroup.Value):(F)" | Out-Null
|
||||
Set-ItemProperty -Path $global:wimFilePath -Name IsReadOnly -Value $false
|
||||
Mount-WindowsImage -ImagePath $global:wimFilePath -Index 2 -Path $global:mountPath
|
||||
Write-Host "Boot image mounted. Loading registry from boot image..."
|
||||
reg load HKLM\zCOMPONENTS "$global:mountPath\Windows\System32\config\COMPONENTS" | Out-Null
|
||||
reg load HKLM\zDEFAULT "$global:mountPath\Windows\System32\config\default" | Out-Null
|
||||
reg load HKLM\zNTUSER "$global:mountPath\Users\Default\ntuser.dat" | Out-Null
|
||||
reg load HKLM\zSOFTWARE "$global:mountPath\Windows\System32\config\SOFTWARE" | Out-Null
|
||||
reg load HKLM\zSYSTEM "$global:mountPath\Windows\System32\config\SYSTEM" | Out-Null
|
||||
|
||||
Write-Host "Applying tweaks to boot image registry..."
|
||||
& reg add 'HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV1' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV2' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV1' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache' '/v' 'SV2' '/t' 'REG_DWORD' '/d' '0' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassCPUCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassRAMCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassSecureBootCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassStorageCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\LabConfig' '/v' 'BypassTPMCheck' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
& reg add 'HKLM\zSYSTEM\Setup\MoSetup' '/v' 'AllowUpgradesWithUnsupportedTPMOrCPU' '/t' 'REG_DWORD' '/d' '1' '/f' | Out-Null
|
||||
|
||||
Write-Host "Tweaks for boot image applied. Unloading registry hives..."
|
||||
reg unload HKLM\zCOMPONENTS | Out-Null
|
||||
reg unload HKLM\zDEFAULT | Out-Null
|
||||
reg unload HKLM\zNTUSER | Out-Null
|
||||
reg unload HKLM\zSOFTWARE | Out-Null
|
||||
reg unload HKLM\zSYSTEM | Out-Null
|
||||
|
||||
Write-Host "Unmounting boot image (saving changes)..."
|
||||
Dismount-WindowsImage -Path $global:mountPath -Save
|
||||
}
|
||||
|
||||
#endregion Process boot.wim Image
|
||||
|
||||
#region Finalize ISO Creation
|
||||
|
||||
function Finalize-ISO {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Uses oscdimg.exe to create the final Tiny11 ISO from the customized image.
|
||||
#>
|
||||
Write-Host "Copying unattended file for bypassing MS account on OOBE..."
|
||||
Copy-Item -Path "$PSScriptRoot\autounattend.xml" -Destination "$global:tiny11Folder\autounattend.xml" -Force | Out-Null
|
||||
|
||||
Write-Host "Creating final ISO image..."
|
||||
$ADKDepTools = "C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\$hostarchitecture\Oscdimg"
|
||||
$localOSCDIMGPath = "$PSScriptRoot\oscdimg.exe"
|
||||
|
||||
if ([System.IO.Directory]::Exists($ADKDepTools)) {
|
||||
Write-Host "Using oscdimg.exe from the system ADK."
|
||||
$OSCDIMG = Join-Path $ADKDepTools "oscdimg.exe"
|
||||
} else {
|
||||
Write-Host "ADK folder not found. Using bundled oscdimg.exe."
|
||||
if (-not (Test-Path -Path $localOSCDIMGPath)) {
|
||||
Write-Host "Downloading oscdimg.exe..."
|
||||
$url = "https://msdl.microsoft.com/download/symbols/oscdimg.exe/3D44737265000/oscdimg.exe"
|
||||
Invoke-WebRequest -Uri $url -OutFile $localOSCDIMGPath
|
||||
if (-not (Test-Path $localOSCDIMGPath)) {
|
||||
Write-Error "Failed to download oscdimg.exe."
|
||||
exit 1
|
||||
}
|
||||
} else {
|
||||
Write-Host "oscdimg.exe already exists locally."
|
||||
}
|
||||
$OSCDIMG = $localOSCDIMGPath
|
||||
}
|
||||
|
||||
# Define boot data (adjust paths if necessary)
|
||||
$bootData = "2#p0,e,b$global:tiny11Folder\boot\etfsboot.com#pEF,e,b$global:tiny11Folder\efi\microsoft\boot\efisys.bin"
|
||||
$isoOutput = Join-Path $PSScriptRoot "tiny11.iso"
|
||||
& "$OSCDIMG" '-m' '-o' '-u2' '-udfver102' "-bootdata:$bootData" "$global:tiny11Folder" "$isoOutput"
|
||||
Write-Host "ISO creation complete: $isoOutput" -ForegroundColor Green
|
||||
}
|
||||
|
||||
#endregion Finalize ISO Creation
|
||||
|
||||
#region Cleanup
|
||||
|
||||
function Cleanup-Environment {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Cleans up temporary folders used during image processing.
|
||||
#>
|
||||
Write-Host "Performing cleanup..."
|
||||
Remove-Item -Path "$global:tiny11Folder" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Remove-Item -Path "$global:mountPath" -Recurse -Force -ErrorAction SilentlyContinue
|
||||
Stop-Transcript
|
||||
Write-Host "Cleanup complete."
|
||||
}
|
||||
|
||||
#endregion Cleanup
|
||||
|
||||
#region Main Flow
|
||||
|
||||
function Main {
|
||||
# Step 1: Setup environment (parameters, admin check, logging, directories)
|
||||
Setup-Environment
|
||||
|
||||
# Step 2: Obtain and mount installation media (ISO)
|
||||
$mediaDrive = Get-InstallationMedia
|
||||
|
||||
# Step 3: Process the install.wim image (copy files, convert ESD if needed, apply tweaks)
|
||||
Process-InstallImage -DriveLetter $mediaDrive
|
||||
|
||||
# Step 4: Process the boot.wim image
|
||||
Process-BootImage
|
||||
|
||||
# Step 5: Finalize ISO creation using oscdimg.exe
|
||||
Finalize-ISO
|
||||
|
||||
# Step 6: Cleanup temporary folders and stop logging
|
||||
Cleanup-Environment
|
||||
|
||||
Write-Host "Tiny11 image creation completed. Press Enter to exit."
|
||||
Read-Host
|
||||
exit
|
||||
}
|
||||
|
||||
# Start the main flow
|
||||
Main
|
||||
|
||||
#endregion Main Flow
|
||||
126
README.md
126
README.md
|
|
@ -1,60 +1,84 @@
|
|||
# tiny11builder
|
||||
# ElevenBuilder
|
||||
|
||||
Scripts to build a trimmed-down Windows 11 image.
|
||||
To build a trimmed-down Windows 11 image.
|
||||
|
||||
This is a script to automate the build of a streamlined Windows 11 image, similar to tiny11.
|
||||
My main goal is to use only Microsoft utilities like DISM, and nothing external. The only executable included is oscdimg.exe, which is provided in the Windows ADK and it is used to create bootable ISO images. Also included is an unattended answer file, which is used to bypass the MS account on OOBE and to deploy the image with the /compact flag.
|
||||
It's open-source, so feel free to add or remove anything you want! Feedback is also much appreciated.
|
||||
ElevenBuilder is a flexible solution - one script fits all. Also, it is a steppingstone for an even more fleshed-out solution.
|
||||
|
||||
As of now, only build 22621.525 (the one that can be downloaded from the Microsoft website), 22621.1265 (the latest public build) and 25300 (latest Insider build as of now) are supported.
|
||||
You need to set the execution policy to Unrestricted, so that you can run the script.
|
||||
If you haven't done this before, make sure to run:
|
||||
|
||||
Instructions:
|
||||
```powershell
|
||||
Set-ExecutionPolicy unrestricted
|
||||
```
|
||||
|
||||
1. Download Windows 11 22621.1265 from UUPDump or 22621.525 or 25300 from the Microsoft website (<https://www.microsoft.com/software-download/windows11>)
|
||||
2. Mount the downloaded ISO image using Windows Explorer.
|
||||
3. For .1265, run tiny11 creator.bat as administrator. For .525 or 25300, use the aptly-named script (also as administrator).
|
||||
4. Select the drive letter where the image is mounted (only the letter, no colon (:))
|
||||
5. Select the SKU that you want the image to be based.
|
||||
6. Sit back and relax :)
|
||||
7. When the image is completed, you will see it in the folder where the script was extracted, with the name tiny11.iso
|
||||
as administrator in PowerShell before running the script, otherwise it will not run.
|
||||
|
||||
What is removed:
|
||||
Clipchamp,
|
||||
News,
|
||||
Weather,
|
||||
Xbox (although Xbox Identity provider is still here, so it should be possible to be reinstalled with no issues),
|
||||
GetHelp,
|
||||
GetStarted,
|
||||
Office Hub,
|
||||
Solitaire,
|
||||
PeopleApp,
|
||||
PowerAutomate,
|
||||
ToDo,
|
||||
Alarms,
|
||||
Mail and Calendar,
|
||||
Feedback Hub,
|
||||
Maps,
|
||||
Sound Recorder,
|
||||
Your Phone,
|
||||
Media Player,
|
||||
QuickAssist,
|
||||
Internet Explorer,
|
||||
LA57 support,
|
||||
OCR for en-us,
|
||||
Speech support,
|
||||
TTS for en-us,
|
||||
Media Player Legacy,
|
||||
Tablet PC Math,
|
||||
Wallpapers,
|
||||
Edge,
|
||||
OneDrive
|
||||
This is a script has been created to automate the build of a streamlined Windows 11 Image, similar to tiny11.
|
||||
The main goal is to use only Microsoft utilities like DISM, and no utilities from external sources.
|
||||
The only executable included is oscdimg.exe, which is provided in the Windows ADK and is used to create bootable ISO images.
|
||||
Also included is an unattended answer file, which is used to bypass the Microsoft Account on OOBE and to deploy the image with the /compact flag.
|
||||
|
||||
Known issues:
|
||||
Instructions: (Needs to be rewritten - Consider as unstable/broken for the moment...)
|
||||
|
||||
1. Microsoft Teams (personal) and Cortana are still here. If you find a way to remove them before I find one, feel free to help!
|
||||
2. Although Edge is removed, the icon and a ghost of its taskbar pin are still available. Also, there are some remnants in the Settings. But the app in itself is deleted.
|
||||
3. The script is rather inflexible, as in only the builds specified can be modified. This is because with each new build Microsoft also updates the inbox apps included. If one tries to use other builds, it will work with varying degrees of success, but some things like the removal of Edge and OneDrive as well as bypassing system requirements or other patches will always be applied.
|
||||
4. Only en-us x64 is supported as of now. This can be easily fixable by the end user, just by replacing every instance of en-us with the language needed (like ro-RO and so on), and every x64 instance with arm64.
|
||||
- Download Windows 11 from the Microsoft website: Microsoft Windows 11 Download
|
||||
- Mount the downloaded ISO image using Windows Explorer.
|
||||
- Select the drive letter where the image is mounted (only the letter, no colon :)
|
||||
- Select the SKU that you want the image to be based on.
|
||||
- Sit back and relax :)
|
||||
|
||||
And that's pretty much it for now!
|
||||
Thanks for trying it and let me know how you like it!
|
||||
When the image is completed, you will see it in the folder where the script was extracted, with the name tiny11.iso
|
||||
|
||||
What has been removed:
|
||||
|
||||
- Clipchamp
|
||||
- News
|
||||
- Weather
|
||||
- Xbox (although Xbox Identity provider is still here, so it should be possible to reinstall it with no issues)
|
||||
- GetHelp
|
||||
- GetStarted
|
||||
- Office Hub
|
||||
- Solitaire
|
||||
- PeopleApp
|
||||
- PowerAutomate
|
||||
- ToDo
|
||||
- Alarms
|
||||
- Mail and Calendar
|
||||
- Feedback Hub
|
||||
- Maps
|
||||
- Sound Recorder
|
||||
- Your Phone
|
||||
- Media Player
|
||||
- QuickAssist
|
||||
- Internet Explorer
|
||||
- Tablet PC Math
|
||||
- Microsoft Edge
|
||||
- Microsoft OneDrive
|
||||
|
||||
You will be asked during image creation if you want to enable .NET 3.5 support!
|
||||
|
||||
### Known Issues:
|
||||
|
||||
Edge remnants: Although Edge is removed, some remnants exist in the Settings. However, the app itself is deleted. You can install any browser using WinGet (after updating the app using the Microsoft Store). If you want Edge, Copilot, and Web Search back, simply install Edge using:
|
||||
|
||||
```powershell
|
||||
winget install edge
|
||||
```
|
||||
|
||||
**Note:** You might need to update Winget before being able to install any apps via Microsoft Store.
|
||||
|
||||
Outlook and Dev Home might reappear after some time due to Windows Updates.
|
||||
|
||||
ARM64 error message: If using this script on ARM64, you might see an error while running the script. This happens because the ARM64 image doesn't have OneDriveSetup.exe included in the System32 folder.
|
||||
|
||||
### Features to be implemented:
|
||||
|
||||
- More ad suppression
|
||||
- Improved language and architecture detection
|
||||
- More flexibility in what to keep and what to delete
|
||||
- Maybe a GUI???
|
||||
|
||||
### Disclaimer
|
||||
|
||||
Microsoft and there Products are registered trademarks.
|
||||
|
||||
It's open-source, so feel free to add or remove anything you want! Feedback is also much appreciated! :-)
|
||||
|
|
@ -1,37 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="oobeSystem">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<OOBE>
|
||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||
</OOBE>
|
||||
</component>
|
||||
</settings>
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<ConfigureChatAutoInstall>false</ConfigureChatAutoInstall>
|
||||
</component>
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DynamicUpdate>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</DynamicUpdate>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<Compact>true</Compact>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/INDEX</Key>
|
||||
<Value>1</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<ProductKey>
|
||||
<Key></Key>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="oobeSystem">
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<OOBE>
|
||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||
</OOBE>
|
||||
</component>
|
||||
</settings>
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<ConfigureChatAutoInstall>false</ConfigureChatAutoInstall>
|
||||
</component>
|
||||
<settings pass="windowsPE">
|
||||
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
|
||||
<DynamicUpdate>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
</DynamicUpdate>
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<Compact>true</Compact>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
<InstallFrom>
|
||||
<MetaData wcm:action="add">
|
||||
<Key>/IMAGE/INDEX</Key>
|
||||
<Value>1</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<UserData>
|
||||
<ProductKey>
|
||||
<Key/>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
</component>
|
||||
</settings>
|
||||
</unattend>
|
||||
|
|
|
|||
BIN
oscdimg.exe
BIN
oscdimg.exe
Binary file not shown.
|
|
@ -1,234 +0,0 @@
|
|||
@echo off
|
||||
setlocal EnableExtensions EnableDelayedExpansion
|
||||
|
||||
title tiny11 builder alpha
|
||||
echo Welcome to the tiny11 image creator!
|
||||
timeout /t 3 /nobreak > nul
|
||||
cls
|
||||
|
||||
set DriveLetter=
|
||||
set /p DriveLetter=Please enter the drive letter for the Windows 11 image:
|
||||
set "DriveLetter=%DriveLetter%:"
|
||||
echo.
|
||||
if not exist "%DriveLetter%\sources\boot.wim" (
|
||||
echo.Can't find Windows OS Installation files in the specified Drive Letter..
|
||||
echo.
|
||||
echo.Please enter the correct DVD Drive Letter..
|
||||
goto :Stop
|
||||
)
|
||||
|
||||
if not exist "%DriveLetter%\sources\install.wim" (
|
||||
echo.Can't find Windows OS Installation files in the specified Drive Letter..
|
||||
echo.
|
||||
echo.Please enter the correct DVD Drive Letter..
|
||||
goto :Stop
|
||||
)
|
||||
md c:\tiny11
|
||||
echo Copying Windows image...
|
||||
xcopy.exe /E /I /H /R /Y /J %DriveLetter% c:\tiny11 >nul
|
||||
echo Copy complete!
|
||||
sleep 2
|
||||
cls
|
||||
echo Getting image information:
|
||||
dism /Get-WimInfo /wimfile:c:\tiny11\sources\install.wim
|
||||
set index=
|
||||
set /p index=Please enter the image index:
|
||||
set "index=%index%"
|
||||
echo Mounting Windows image. This may take a while.
|
||||
echo.
|
||||
md c:\scratchdir
|
||||
dism /mount-image /imagefile:c:\tiny11\sources\install.wim /index:%index% /mountdir:c:\scratchdir
|
||||
echo Mounting complete! Performing removal of applications...
|
||||
echo Removing Clipchamp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Clipchamp.Clipchamp_2.2.8.0_neutral_~_yxz26nhyzhsrt
|
||||
echo Removing News...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingNews_4.2.27001.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Weather...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingWeather_4.53.33420.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Xbox...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.GamingApp_2021.427.138.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing GetHelp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.GetHelp_10.2201.421.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing GetStarted...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Getstarted_2021.2204.1.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Office Hub...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftOfficeHub_18.2204.1141.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Solitaire...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftSolitaireCollection_4.12.3171.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing PeopleApp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.People_2020.901.1724.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing PowerAutomate...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.PowerAutomateDesktop_10.0.3735.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing ToDo...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Todos_2.54.42772.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Alarms...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsAlarms_2022.2202.24.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Mail...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:microsoft.windowscommunicationsapps_16005.14326.20544.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Feedback Hub...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsFeedbackHub_2022.106.2230.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Maps...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsMaps_2022.2202.6.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Sound Recorder...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsSoundRecorder_2021.2103.28.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxTCUI...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Xbox.TCUI_1.23.28004.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxGamingOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxGamingOverlay_2.622.3232.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxGameOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxGameOverlay_1.47.2385.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxSpeechToTextOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxSpeechToTextOverlay_1.17.29001.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Your Phone...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.YourPhone_1.22022.147.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Music...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.ZuneMusic_11.2202.46.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Video...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.ZuneVideo_2019.22020.10021.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Family...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftCorporationII.MicrosoftFamily_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing QuickAssist...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftCorporationII.QuickAssist_2022.414.1758.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Teams...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftTeams_23002.403.1788.1930_x64__8wekyb3d8bbwe
|
||||
echo Removing Cortana...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.549981C3F5F10_4.2204.13303.0_neutral_~_8wekyb3d8bbwe
|
||||
|
||||
echo Removing of system apps complete! Now proceeding to removal of system packages...
|
||||
timeout /t 1 /nobreak > nul
|
||||
cls
|
||||
echo Removing Internet Explorer...
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~en-US~11.0.22621.1 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~11.0.22621.525 > nul
|
||||
echo Removing LA57:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-Kernel-LA57-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
echo Removing Handwriting:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-Handwriting-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
echo Removing OCR:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-OCR-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
echo Removing Speech:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-Speech-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
echo Removing TTS:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-TextToSpeech-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
echo Removing Media Player Legacy:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~wow64~en-US~10.0.22621.1 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~wow64~~10.0.22621.1 > nul
|
||||
echo Removing Tablet PC Math:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-TabletPCMath-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
echo Removing Wallpapers:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-Wallpaper-Content-Extended-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.525 > nul
|
||||
|
||||
echo Removing Edge:
|
||||
rd "C:\scratchdir\Program Files (x86)\Microsoft\Edge" /s /q
|
||||
rd "C:\scratchdir\Program Files (x86)\Microsoft\EdgeUpdate" /s /q
|
||||
echo Removing OneDrive:
|
||||
takeown /f C:\scratchdir\Windows\System32\OneDriveSetup.exe
|
||||
icacls C:\scratchdir\Windows\System32\OneDriveSetup.exe /grant Administrators:F /T /C
|
||||
del /f /q /s "C:\scratchdir\Windows\System32\OneDriveSetup.exe"
|
||||
echo Removal complete!
|
||||
timeout /t 2 /nobreak > nul
|
||||
cls
|
||||
echo Loading registry...
|
||||
reg load HKLM\zCOMPONENTS "c:\scratchdir\Windows\System32\config\COMPONENTS" >nul
|
||||
reg load HKLM\zDEFAULT "c:\scratchdir\Windows\System32\config\default" >nul
|
||||
reg load HKLM\zNTUSER "c:\scratchdir\Users\Default\ntuser.dat" >nul
|
||||
reg load HKLM\zSOFTWARE "c:\scratchdir\Windows\System32\config\SOFTWARE" >nul
|
||||
reg load HKLM\zSYSTEM "c:\scratchdir\Windows\System32\config\SYSTEM" >nul
|
||||
echo Bypassing system requirements(on the system image):
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
echo Disabling Teams:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Disabling Sponsored Apps:
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\PolicyManager\current\device\Start" /v "ConfigureStartPins" /t REG_SZ /d "{\"pinnedList\": [{}]}" /f >nul 2>&1
|
||||
echo Enabling Local Accounts on OOBE:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "BypassNRO" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
copy /y %~dp0autounattend.xml c:\scratchdir\Windows\System32\Sysprep\autounattend.xml
|
||||
echo Disabling Reserved Storage:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Disabling Chat icon:
|
||||
Reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Chat" /v "ChatIcon" /t REG_DWORD /d "3" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Tweaking complete!
|
||||
echo Unmounting Registry...
|
||||
reg unload HKLM\zCOMPONENTS >nul 2>&1
|
||||
reg unload HKLM\zDRIVERS >nul 2>&1
|
||||
reg unload HKLM\zDEFAULT >nul 2>&1
|
||||
reg unload HKLM\zNTUSER >nul 2>&1
|
||||
reg unload HKLM\zSCHEMA >nul 2>&1
|
||||
reg unload HKLM\zSOFTWARE >nul 2>&1
|
||||
reg unload HKLM\zSYSTEM >nul 2>&1
|
||||
echo Cleaning up image...
|
||||
dism /image:c:\scratchdir /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||
echo Cleanup complete.
|
||||
echo Unmounting image...
|
||||
dism /unmount-image /mountdir:c:\scratchdir /commit
|
||||
echo Exporting image...
|
||||
Dism /Export-Image /SourceImageFile:c:\tiny11\sources\install.wim /SourceIndex:%index% /DestinationImageFile:c:\tiny11\sources\install2.wim /compress:max
|
||||
del c:\tiny11\sources\install.wim
|
||||
ren c:\tiny11\sources\install2.wim install.wim
|
||||
echo Windows image completed. Continuing with boot.wim.
|
||||
timeout /t 2 /nobreak > nul
|
||||
cls
|
||||
echo Mounting boot image:
|
||||
dism /mount-image /imagefile:c:\tiny11\sources\boot.wim /index:2 /mountdir:c:\scratchdir
|
||||
echo Loading registry...
|
||||
reg load HKLM\zCOMPONENTS "c:\scratchdir\Windows\System32\config\COMPONENTS" >nul
|
||||
reg load HKLM\zDEFAULT "c:\scratchdir\Windows\System32\config\default" >nul
|
||||
reg load HKLM\zNTUSER "c:\scratchdir\Users\Default\ntuser.dat" >nul
|
||||
reg load HKLM\zSOFTWARE "c:\scratchdir\Windows\System32\config\SOFTWARE" >nul
|
||||
reg load HKLM\zSYSTEM "c:\scratchdir\Windows\System32\config\SYSTEM" >nul
|
||||
echo Bypassing system requirements(on the setup image):
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
echo Tweaking complete!
|
||||
echo Unmounting Registry...
|
||||
reg unload HKLM\zCOMPONENTS >nul 2>&1
|
||||
reg unload HKLM\zDRIVERS >nul 2>&1
|
||||
reg unload HKLM\zDEFAULT >nul 2>&1
|
||||
reg unload HKLM\zNTUSER >nul 2>&1
|
||||
reg unload HKLM\zSCHEMA >nul 2>&1
|
||||
reg unload HKLM\zSOFTWARE >nul 2>&1
|
||||
reg unload HKLM\zSYSTEM >nul 2>&1
|
||||
echo Unmounting image...
|
||||
dism /unmount-image /mountdir:c:\scratchdir /commit
|
||||
cls
|
||||
echo the tiny11 image is now completed. Proceeding with the making of the ISO...
|
||||
echo Copying unattended file for bypassing MS account on OOBE...
|
||||
copy /y %~dp0autounattend.xml c:\tiny11\autounattend.xml
|
||||
echo.
|
||||
echo Creating ISO image...
|
||||
%~dp0oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\tiny11\boot\etfsboot.com#pEF,e,bc:\tiny11\efi\microsoft\boot\efisys.bin c:\tiny11 %~dp0tiny11.iso
|
||||
echo Creation completed! Press any key to exit the script...
|
||||
pause
|
||||
echo Performing Cleanup...
|
||||
rd c:\tiny11 /s /q
|
||||
rd c:\scratchdir /s /q
|
||||
exit
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,233 +0,0 @@
|
|||
@echo off
|
||||
setlocal EnableExtensions EnableDelayedExpansion
|
||||
|
||||
title tiny11 builder alpha
|
||||
echo Welcome to the tiny11 image creator!
|
||||
timeout /t 3 /nobreak > nul
|
||||
cls
|
||||
|
||||
set DriveLetter=
|
||||
set /p DriveLetter=Please enter the drive letter for the Windows 11 image:
|
||||
set "DriveLetter=%DriveLetter%:"
|
||||
echo.
|
||||
if not exist "%DriveLetter%\sources\boot.wim" (
|
||||
echo.Can't find Windows OS Installation files in the specified Drive Letter..
|
||||
echo.
|
||||
echo.Please enter the correct DVD Drive Letter..
|
||||
goto :Stop
|
||||
)
|
||||
|
||||
if not exist "%DriveLetter%\sources\install.wim" (
|
||||
echo.Can't find Windows OS Installation files in the specified Drive Letter..
|
||||
echo.
|
||||
echo.Please enter the correct DVD Drive Letter..
|
||||
goto :Stop
|
||||
)
|
||||
md c:\tiny11
|
||||
echo Copying Windows image...
|
||||
xcopy.exe /E /I /H /R /Y /J %DriveLetter% c:\tiny11 >nul
|
||||
echo Copy complete!
|
||||
sleep 2
|
||||
cls
|
||||
echo Getting image information:
|
||||
dism /Get-WimInfo /wimfile:c:\tiny11\sources\install.wim
|
||||
set index=
|
||||
set /p index=Please enter the image index:
|
||||
set "index=%index%"
|
||||
echo Mounting Windows image. This may take a while.
|
||||
echo.
|
||||
md c:\scratchdir
|
||||
dism /mount-image /imagefile:c:\tiny11\sources\install.wim /index:%index% /mountdir:c:\scratchdir
|
||||
echo Mounting complete! Performing removal of applications...
|
||||
echo Removing Clipchamp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Clipchamp.Clipchamp_2.5.15.0_neutral_~_yxz26nhyzhsrt
|
||||
echo Removing News...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingNews_4.12.21001.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Weather...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingWeather_4.53.50023.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Xbox...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.GamingApp_2021.427.138.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing GetHelp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.GetHelp_10.2206.2011.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing GetStarted...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Getstarted_2021.2204.1.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Office Hub...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftOfficeHub_18.2204.1141.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Solitaire...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftSolitaireCollection_4.12.3171.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing PeopleApp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.People_2020.901.1724.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing PowerAutomate...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.PowerAutomateDesktop_10.0.3735.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing ToDo...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Todos_2.54.42772.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Alarms...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsAlarms_2022.2210.9.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Mail...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:microsoft.windowscommunicationsapps_16005.14326.20544.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Feedback Hub...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsFeedbackHub_2022.106.2230.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Maps...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsMaps_2022.2208.6.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Sound Recorder...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsSoundRecorder_2021.2208.27.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxTCUI...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Xbox.TCUI_1.23.28004.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxGamingOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxGamingOverlay_2.622.3232.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxGameOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxGameOverlay_1.47.2385.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxSpeechToTextOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxSpeechToTextOverlay_1.17.29001.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Your Phone...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.YourPhone_1.22022.147.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Music...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.ZuneMusic_11.2210.33.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Video...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.ZuneVideo_2019.22120.10031.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Family...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftCorporationII.MicrosoftFamily_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing QuickAssist...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftCorporationII.QuickAssist_2022.825.2016.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Teams...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftTeams_23002.403.1788.1930_x64__8wekyb3d8bbwe
|
||||
echo Removing Cortana...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.549981C3F5F10_4.2204.13303.0_neutral_~_8wekyb3d8bbwe
|
||||
|
||||
echo Removing of system apps complete! Now proceeding to removal of system packages...
|
||||
timeout /t 1 /nobreak > nul
|
||||
cls
|
||||
echo Removing Internet Explorer...
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~en-US~11.0.25300.1000 > nul
|
||||
echo Removing LA57:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-Kernel-LA57-FoD-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
echo Removing Handwriting:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-Handwriting-en-us-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
echo Removing OCR:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-OCR-en-us-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
echo Removing Speech:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-Speech-en-us-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
echo Removing TTS:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-TextToSpeech-en-us-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
echo Removing Media Player Legacy:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~wow64~en-US~10.0.25300.1000 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~wow64~~10.0.25300.1000 > nul
|
||||
echo Removing Tablet PC Math:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-TabletPCMath-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
echo Removing Wallpapers:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-Wallpaper-Content-Extended-FoD-Package~31bf3856ad364e35~amd64~~10.0.25300.1000 > nul
|
||||
|
||||
echo Removing Edge:
|
||||
rd "C:\scratchdir\Program Files (x86)\Microsoft\Edge" /s /q
|
||||
rd "C:\scratchdir\Program Files (x86)\Microsoft\EdgeUpdate" /s /q
|
||||
echo Removing OneDrive:
|
||||
takeown /f C:\scratchdir\Windows\System32\OneDriveSetup.exe
|
||||
icacls C:\scratchdir\Windows\System32\OneDriveSetup.exe /grant Administrators:F /T /C
|
||||
del /f /q /s "C:\scratchdir\Windows\System32\OneDriveSetup.exe"
|
||||
echo Removal complete!
|
||||
timeout /t 2 /nobreak > nul
|
||||
cls
|
||||
echo Loading registry...
|
||||
reg load HKLM\zCOMPONENTS "c:\scratchdir\Windows\System32\config\COMPONENTS" >nul
|
||||
reg load HKLM\zDEFAULT "c:\scratchdir\Windows\System32\config\default" >nul
|
||||
reg load HKLM\zNTUSER "c:\scratchdir\Users\Default\ntuser.dat" >nul
|
||||
reg load HKLM\zSOFTWARE "c:\scratchdir\Windows\System32\config\SOFTWARE" >nul
|
||||
reg load HKLM\zSYSTEM "c:\scratchdir\Windows\System32\config\SYSTEM" >nul
|
||||
echo Bypassing system requirements(on the system image):
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
echo Disabling Teams:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Disabling Sponsored Apps:
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\PolicyManager\current\device\Start" /v "ConfigureStartPins" /t REG_SZ /d "{\"pinnedList\": [{}]}" /f >nul 2>&1
|
||||
echo Enabling Local Accounts on OOBE:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "BypassNRO" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
copy /y %~dp0autounattend.xml c:\scratchdir\Windows\System32\Sysprep\autounattend.xml
|
||||
echo Disabling Reserved Storage:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Disabling Chat icon:
|
||||
Reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Chat" /v "ChatIcon" /t REG_DWORD /d "3" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Tweaking complete!
|
||||
echo Unmounting Registry...
|
||||
reg unload HKLM\zCOMPONENTS >nul 2>&1
|
||||
reg unload HKLM\zDRIVERS >nul 2>&1
|
||||
reg unload HKLM\zDEFAULT >nul 2>&1
|
||||
reg unload HKLM\zNTUSER >nul 2>&1
|
||||
reg unload HKLM\zSCHEMA >nul 2>&1
|
||||
reg unload HKLM\zSOFTWARE >nul 2>&1
|
||||
reg unload HKLM\zSYSTEM >nul 2>&1
|
||||
echo Cleaning up image...
|
||||
dism /image:c:\scratchdir /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||
echo Cleanup complete.
|
||||
echo Unmounting image...
|
||||
dism /unmount-image /mountdir:c:\scratchdir /commit
|
||||
echo Exporting image...
|
||||
Dism /Export-Image /SourceImageFile:c:\tiny11\sources\install.wim /SourceIndex:%index% /DestinationImageFile:c:\tiny11\sources\install2.wim /compress:max
|
||||
del c:\tiny11\sources\install.wim
|
||||
ren c:\tiny11\sources\install2.wim install.wim
|
||||
echo Windows image completed. Continuing with boot.wim.
|
||||
timeout /t 2 /nobreak > nul
|
||||
cls
|
||||
echo Mounting boot image:
|
||||
dism /mount-image /imagefile:c:\tiny11\sources\boot.wim /index:2 /mountdir:c:\scratchdir
|
||||
echo Loading registry...
|
||||
reg load HKLM\zCOMPONENTS "c:\scratchdir\Windows\System32\config\COMPONENTS" >nul
|
||||
reg load HKLM\zDEFAULT "c:\scratchdir\Windows\System32\config\default" >nul
|
||||
reg load HKLM\zNTUSER "c:\scratchdir\Users\Default\ntuser.dat" >nul
|
||||
reg load HKLM\zSOFTWARE "c:\scratchdir\Windows\System32\config\SOFTWARE" >nul
|
||||
reg load HKLM\zSYSTEM "c:\scratchdir\Windows\System32\config\SYSTEM" >nul
|
||||
echo Bypassing system requirements(on the setup image):
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
echo Tweaking complete!
|
||||
echo Unmounting Registry...
|
||||
reg unload HKLM\zCOMPONENTS >nul 2>&1
|
||||
reg unload HKLM\zDRIVERS >nul 2>&1
|
||||
reg unload HKLM\zDEFAULT >nul 2>&1
|
||||
reg unload HKLM\zNTUSER >nul 2>&1
|
||||
reg unload HKLM\zSCHEMA >nul 2>&1
|
||||
reg unload HKLM\zSOFTWARE >nul 2>&1
|
||||
reg unload HKLM\zSYSTEM >nul 2>&1
|
||||
echo Unmounting image...
|
||||
dism /unmount-image /mountdir:c:\scratchdir /commit
|
||||
cls
|
||||
echo the tiny11 image is now completed. Proceeding with the making of the ISO...
|
||||
echo Copying unattended file for bypassing MS account on OOBE...
|
||||
copy /y %~dp0autounattend.xml c:\tiny11\autounattend.xml
|
||||
echo.
|
||||
echo Creating ISO image...
|
||||
%~dp0oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\tiny11\boot\etfsboot.com#pEF,e,bc:\tiny11\efi\microsoft\boot\efisys.bin c:\tiny11 %~dp0tiny11.iso
|
||||
echo Creation completed! Press any key to exit the script...
|
||||
pause
|
||||
echo Performing Cleanup...
|
||||
rd c:\tiny11 /s /q
|
||||
rd c:\scratchdir /s /q
|
||||
exit
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,234 +0,0 @@
|
|||
@echo off
|
||||
setlocal EnableExtensions EnableDelayedExpansion
|
||||
|
||||
title tiny11 builder alpha
|
||||
echo Welcome to the tiny11 image creator!
|
||||
timeout /t 3 /nobreak > nul
|
||||
cls
|
||||
|
||||
set DriveLetter=
|
||||
set /p DriveLetter=Please enter the drive letter for the Windows 11 image:
|
||||
set "DriveLetter=%DriveLetter%:"
|
||||
echo.
|
||||
if not exist "%DriveLetter%\sources\boot.wim" (
|
||||
echo.Can't find Windows OS Installation files in the specified Drive Letter..
|
||||
echo.
|
||||
echo.Please enter the correct DVD Drive Letter..
|
||||
goto :Stop
|
||||
)
|
||||
|
||||
if not exist "%DriveLetter%\sources\install.wim" (
|
||||
echo.Can't find Windows OS Installation files in the specified Drive Letter..
|
||||
echo.
|
||||
echo.Please enter the correct DVD Drive Letter..
|
||||
goto :Stop
|
||||
)
|
||||
md c:\tiny11
|
||||
echo Copying Windows image...
|
||||
xcopy.exe /E /I /H /R /Y /J %DriveLetter% c:\tiny11 >nul
|
||||
echo Copy complete!
|
||||
sleep 2
|
||||
cls
|
||||
echo Getting image information:
|
||||
dism /Get-WimInfo /wimfile:c:\tiny11\sources\install.wim
|
||||
set index=
|
||||
set /p index=Please enter the image index:
|
||||
set "index=%index%"
|
||||
echo Mounting Windows image. This may take a while.
|
||||
echo.
|
||||
md c:\scratchdir
|
||||
dism /mount-image /imagefile:c:\tiny11\sources\install.wim /index:%index% /mountdir:c:\scratchdir
|
||||
echo Mounting complete! Performing removal of applications...
|
||||
echo Removing Clipchamp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Clipchamp.Clipchamp_2.2.8.0_neutral_~_yxz26nhyzhsrt
|
||||
echo Removing News...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingNews_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Weather...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.BingWeather_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Xbox...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.GamingApp_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing GetHelp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.GetHelp_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing GetStarted...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Getstarted_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Office Hub...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftOfficeHub_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Solitaire...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftSolitaireCollection_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing PeopleApp...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.People_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing PowerAutomate...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.PowerAutomateDesktop_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing ToDo...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Todos_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Alarms...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsAlarms_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Mail...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:microsoft.windowscommunicationsapps_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Feedback Hub...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsFeedbackHub_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Maps...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsMaps_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Sound Recorder...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.WindowsSoundRecorder_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxTCUI...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.Xbox.TCUI_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxGamingOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxGamingOverlay_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxGameOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxGameOverlay_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing XboxSpeechToTextOverlay...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.XboxSpeechToTextOverlay_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Your Phone...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.YourPhone_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Music...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.ZuneMusic_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Video...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.ZuneVideo_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Family...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftCorporationII.MicrosoftFamily_2022.507.447.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing QuickAssist...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftCorporationII.QuickAssist_2022.507.446.0_neutral_~_8wekyb3d8bbwe
|
||||
echo Removing Teams...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:MicrosoftTeams_23002.403.1788.1930_x64__8wekyb3d8bbwe
|
||||
echo Removing Cortana...
|
||||
dism /image:c:\scratchdir /Remove-ProvisionedAppxPackage /PackageName:Microsoft.549981C3F5F10_4.2204.13303.0_neutral_~_8wekyb3d8bbwe
|
||||
|
||||
echo Removing of system apps complete! Now proceeding to removal of system packages...
|
||||
timeout /t 1 /nobreak > nul
|
||||
cls
|
||||
echo Removing Internet Explorer...
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~en-US~11.0.22621.1 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~11.0.22621.1265 > nul
|
||||
echo Removing LA57:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-Kernel-LA57-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
echo Removing Handwriting:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-Handwriting-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
echo Removing OCR:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-OCR-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
echo Removing Speech:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-Speech-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
echo Removing TTS:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-LanguageFeatures-TextToSpeech-en-us-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
echo Removing Media Player Legacy:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~wow64~en-US~10.0.22621.1 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~wow64~~10.0.22621.1 > nul
|
||||
echo Removing Tablet PC Math:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-TabletPCMath-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
echo Removing Wallpapers:
|
||||
dism /image:c:\scratchdir /Remove-Package /PackageName:Microsoft-Windows-Wallpaper-Content-Extended-FoD-Package~31bf3856ad364e35~amd64~~10.0.22621.1265 > nul
|
||||
|
||||
echo Removing Edge:
|
||||
rd "C:\scratchdir\Program Files (x86)\Microsoft\Edge" /s /q
|
||||
rd "C:\scratchdir\Program Files (x86)\Microsoft\EdgeUpdate" /s /q
|
||||
echo Removing OneDrive:
|
||||
takeown /f C:\scratchdir\Windows\System32\OneDriveSetup.exe
|
||||
icacls C:\scratchdir\Windows\System32\OneDriveSetup.exe /grant Administrators:F /T /C
|
||||
del /f /q /s "C:\scratchdir\Windows\System32\OneDriveSetup.exe"
|
||||
echo Removal complete!
|
||||
timeout /t 2 /nobreak > nul
|
||||
cls
|
||||
echo Loading registry...
|
||||
reg load HKLM\zCOMPONENTS "c:\scratchdir\Windows\System32\config\COMPONENTS" >nul
|
||||
reg load HKLM\zDEFAULT "c:\scratchdir\Windows\System32\config\default" >nul
|
||||
reg load HKLM\zNTUSER "c:\scratchdir\Users\Default\ntuser.dat" >nul
|
||||
reg load HKLM\zSOFTWARE "c:\scratchdir\Windows\System32\config\SOFTWARE" >nul
|
||||
reg load HKLM\zSYSTEM "c:\scratchdir\Windows\System32\config\SYSTEM" >nul
|
||||
echo Bypassing system requirements(on the system image):
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
echo Disabling Teams:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Communications" /v "ConfigureChatAutoInstall" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Disabling Sponsored Apps:
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "OemPreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "PreInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SilentInstalledAppsEnabled" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\CloudContent" /v "DisableWindowsConsumerFeatures" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\PolicyManager\current\device\Start" /v "ConfigureStartPins" /t REG_SZ /d "{\"pinnedList\": [{}]}" /f >nul 2>&1
|
||||
echo Enabling Local Accounts on OOBE:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\OOBE" /v "BypassNRO" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
copy /y %~dp0autounattend.xml c:\scratchdir\Windows\System32\Sysprep\autounattend.xml
|
||||
echo Disabling Reserved Storage:
|
||||
Reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager" /v "ShippedWithReserves" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Disabling Chat icon:
|
||||
Reg add "HKLM\zSOFTWARE\Policies\Microsoft\Windows\Windows Chat" /v "ChatIcon" /t REG_DWORD /d "3" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "TaskbarMn" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
echo Tweaking complete!
|
||||
echo Unmounting Registry...
|
||||
reg unload HKLM\zCOMPONENTS >nul 2>&1
|
||||
reg unload HKLM\zDRIVERS >nul 2>&1
|
||||
reg unload HKLM\zDEFAULT >nul 2>&1
|
||||
reg unload HKLM\zNTUSER >nul 2>&1
|
||||
reg unload HKLM\zSCHEMA >nul 2>&1
|
||||
reg unload HKLM\zSOFTWARE >nul 2>&1
|
||||
reg unload HKLM\zSYSTEM >nul 2>&1
|
||||
echo Cleaning up image...
|
||||
dism /image:c:\scratchdir /Cleanup-Image /StartComponentCleanup /ResetBase
|
||||
echo Cleanup complete.
|
||||
echo Unmounting image...
|
||||
dism /unmount-image /mountdir:c:\scratchdir /commit
|
||||
echo Exporting image...
|
||||
Dism /Export-Image /SourceImageFile:c:\tiny11\sources\install.wim /SourceIndex:%index% /DestinationImageFile:c:\tiny11\sources\install2.wim /compress:max
|
||||
del c:\tiny11\sources\install.wim
|
||||
ren c:\tiny11\sources\install2.wim install.wim
|
||||
echo Windows image completed. Continuing with boot.wim.
|
||||
timeout /t 2 /nobreak > nul
|
||||
cls
|
||||
echo Mounting boot image:
|
||||
dism /mount-image /imagefile:c:\tiny11\sources\boot.wim /index:2 /mountdir:c:\scratchdir
|
||||
echo Loading registry...
|
||||
reg load HKLM\zCOMPONENTS "c:\scratchdir\Windows\System32\config\COMPONENTS" >nul
|
||||
reg load HKLM\zDEFAULT "c:\scratchdir\Windows\System32\config\default" >nul
|
||||
reg load HKLM\zNTUSER "c:\scratchdir\Users\Default\ntuser.dat" >nul
|
||||
reg load HKLM\zSOFTWARE "c:\scratchdir\Windows\System32\config\SOFTWARE" >nul
|
||||
reg load HKLM\zSYSTEM "c:\scratchdir\Windows\System32\config\SYSTEM" >nul
|
||||
echo Bypassing system requirements(on the setup image):
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zDEFAULT\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zNTUSER\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d "0" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
Reg add "HKLM\zSYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d "1" /f >nul 2>&1
|
||||
echo Tweaking complete!
|
||||
echo Unmounting Registry...
|
||||
reg unload HKLM\zCOMPONENTS >nul 2>&1
|
||||
reg unload HKLM\zDRIVERS >nul 2>&1
|
||||
reg unload HKLM\zDEFAULT >nul 2>&1
|
||||
reg unload HKLM\zNTUSER >nul 2>&1
|
||||
reg unload HKLM\zSCHEMA >nul 2>&1
|
||||
reg unload HKLM\zSOFTWARE >nul 2>&1
|
||||
reg unload HKLM\zSYSTEM >nul 2>&1
|
||||
echo Unmounting image...
|
||||
dism /unmount-image /mountdir:c:\scratchdir /commit
|
||||
cls
|
||||
echo the tiny11 image is now completed. Proceeding with the making of the ISO...
|
||||
echo Copying unattended file for bypassing MS account on OOBE...
|
||||
copy /y %~dp0autounattend.xml c:\tiny11\autounattend.xml
|
||||
echo.
|
||||
echo Creating ISO image...
|
||||
%~dp0oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\tiny11\boot\etfsboot.com#pEF,e,bc:\tiny11\efi\microsoft\boot\efisys.bin c:\tiny11 %~dp0tiny11.iso
|
||||
echo Creation completed! Press any key to exit the script...
|
||||
pause
|
||||
echo Performing Cleanup...
|
||||
rd c:\tiny11 /s /q
|
||||
rd c:\scratchdir /s /q
|
||||
exit
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Reference in a new issue