Compare commits

..

24 Commits

Author SHA1 Message Date
f63c312f22 remove architecture selection 2024-08-20 23:07:14 +02:00
fcd339d54d fix (maybe?) 2024-08-19 22:16:39 +02:00
ea2a92fb1e Merge branch 'main' into microwinisodownloader 2024-08-19 21:51:52 +02:00
07b20cd23d fix some stuff 2024-08-19 21:47:48 +02:00
838716e2f4 little update 2024-08-19 21:28:57 +02:00
7cc5725136 change back to using Fido 2024-08-19 21:22:26 +02:00
2748767a47 [MicroWin] Add custom user settings and other changes (docs/bugfixes) (#2575)
* [MicroWin] Add custom user settings

* Update inputXML.xaml

* Update MicroWin documentation to reflect changes

* Update Invoke-WinUtilMicroWin-Helper.ps1

* Update Invoke-WPFMicrowin.ps1
2024-08-19 14:21:12 -05:00
83fe6c5b12 Auto pushes docs (#2580) 2024-08-19 14:19:37 -05:00
2ea708eeb0 Make "Download" a direct link to download the latest Win11 ISO (#2574) 2024-08-19 14:06:19 -05:00
0ee9972edf little fix 2024-08-19 06:15:06 +02:00
11d3c66fc0 Deploying to main from @ ChrisTitusTech/winutil@3dd51a6c3c 🚀 2024-08-18 15:30:57 +00:00
86a0b9bd03 try1 2024-08-17 20:33:11 +02:00
3dd51a6c3c Deploying to main from @ ChrisTitusTech/winutil@307980a7ef 🚀 2024-08-16 15:30:52 +00:00
307980a7ef Fixed VMware network driver issues (#2567) 2024-08-16 00:12:44 -05:00
93c96fafd2 Deploying to main from @ ChrisTitusTech/winutil@4d2ea15e19 🚀 2024-08-15 15:31:07 +00:00
4d2ea15e19 [MicroWin] Add try-catch block for AppX packages (#2560) 2024-08-14 14:31:24 -05:00
b0d54e41ad Update contribute.md 2024-08-14 13:54:10 -05:00
d0fa506e4f Update mkdocs.yml 2024-08-14 10:58:33 -05:00
67be99bb7b Update mkdocs.yml 2024-08-14 10:54:52 -05:00
46d9e2c437 Merge branch 'main' of https://github.com/ChrisTitusTech/winutil 2024-08-14 10:34:22 -05:00
863dd83faa Update mkdocs.yml 2024-08-14 10:34:19 -05:00
09eb4eaa00 Deploying to main from @ ChrisTitusTech/winutil@17d523d8f8 🚀 2024-08-14 15:31:03 +00:00
17d523d8f8 change file structure 2024-08-14 10:23:26 -05:00
fa17abdd49 Create SECURITY.md 2024-08-14 09:14:46 -05:00
17 changed files with 262 additions and 106 deletions

View File

5
.github/SECURITY.md vendored Normal file
View File

@ -0,0 +1,5 @@
# Security Policy
If you find a security issue please make post it in the issues tab. If you think it should be private you can email me at contact@christitus.com.
For immediate response check out our discord server @ [![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ)

View File

@ -1,4 +1,5 @@
site_name: WinUtil Documentation site_name: WinUtil Documentation
docs_dir: '../docs'
repo_url: https://github.com/ChrisTitusTech/winutil repo_url: https://github.com/ChrisTitusTech/winutil
nav: nav:
@ -12,7 +13,7 @@ nav:
theme: theme:
name: material name: material
custom_dir: 'overrides' custom_dir: '../overrides'
features: features:
- navigation.tabs - navigation.tabs
- navigation.sections - navigation.sections

View File

@ -1,15 +1,16 @@
name: GitHub Pages Deploy name: GitHub Pages Deploy
on: on:
release: push:
types: [published, prereleased] paths:
- '.github/mkdocs.yml'
- '.github/requirements.txt'
- 'docs/**'
- 'overrides/**'
workflow_dispatch: workflow_dispatch:
permissions:
contents: write
jobs: jobs:
deploy: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -22,10 +23,10 @@ jobs:
uses: actions/setup-python@v5 uses: actions/setup-python@v5
with: with:
python-version: 3.x # Install latest Stable release of Python 3 python-version: 3.x # Install latest Stable release of Python 3
cache: 'pip' # caching pip dependencies cache: 'pip' # Caching pip dependencies
- name: Install Necessary Dependencies using 'pip install -r requirements.txt' - name: Install Necessary Dependencies
run: pip install -r requirements.txt run: pip install -r .github/requirements.txt
- name: Build & Deploy using 'mkdocs' - name: Build & Deploy using mkdocs
run: mkdocs gh-deploy --force run: mkdocs gh-deploy --force -f .github/mkdocs.yml

View File

@ -52,7 +52,7 @@ If you have Issues, refer to [Known Issues](https://christitustech.github.io/win
These are the sponsors that help keep this project alive with monthly contributions. These are the sponsors that help keep this project alive with monthly contributions.
<!-- sponsors --><a href="https://github.com/GregoryNavasarkian"><img src="https://github.com/GregoryNavasarkian.png" width="60px" alt="Gregory Navasarkian" /></a><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/getsmor"><img src="https://github.com/getsmor.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/jeffnesbit"><img src="https://github.com/jeffnesbit.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><!-- sponsors --> <!-- sponsors --><a href="https://github.com/ysaito8015"><img src="https://github.com/ysaito8015.png" width="60px" alt="Yusuke Saito" /></a><a href="https://github.com/TriHydera"><img src="https://github.com/TriHydera.png" width="60px" alt="TriHydera" /></a><a href="https://github.com/jozozovko"><img src="https://github.com/jozozovko.png" width="60px" alt="" /></a><a href="https://github.com/DelDongo"><img src="https://github.com/DelDongo.png" width="60px" alt="" /></a><a href="https://github.com/markamos"><img src="https://github.com/markamos.png" width="60px" alt="Mark Amos" /></a><a href="https://github.com/dwelfusius"><img src="https://github.com/dwelfusius.png" width="60px" alt="" /></a><a href="https://github.com/mews-se"><img src="https://github.com/mews-se.png" width="60px" alt="" /></a><a href="https://github.com/jdiegmueller"><img src="https://github.com/jdiegmueller.png" width="60px" alt="Jason A. Diegmueller" /></a><a href="https://github.com/AlanTristar"><img src="https://github.com/AlanTristar.png" width="60px" alt="" /></a><a href="https://github.com/JennJones89"><img src="https://github.com/JennJones89.png" width="60px" alt="" /></a><a href="https://github.com/zepled112"><img src="https://github.com/zepled112.png" width="60px" alt="wyatt" /></a><a href="https://github.com/altugtekiner"><img src="https://github.com/altugtekiner.png" width="60px" alt="" /></a><a href="https://github.com/robertsandrock"><img src="https://github.com/robertsandrock.png" width="60px" alt="" /></a><a href="https://github.com/mmomega"><img src="https://github.com/mmomega.png" width="60px" alt="" /></a><a href="https://github.com/KenichiQaz"><img src="https://github.com/KenichiQaz.png" width="60px" alt="Stefan" /></a><a href="https://github.com/thaddl"><img src="https://github.com/thaddl.png" width="60px" alt="thaddl" /></a><a href="https://github.com/paulsheets"><img src="https://github.com/paulsheets.png" width="60px" alt="Paul" /></a><a href="https://github.com/djones369"><img src="https://github.com/djones369.png" width="60px" alt="Dave Jones" /></a><a href="https://github.com/anthonymendez"><img src="https://github.com/anthonymendez.png" width="60px" alt="Anthony Mendez" /></a><a href="https://github.com/woobe-studio"><img src="https://github.com/woobe-studio.png" width="60px" alt="Michael Wozniak" /></a><a href="https://github.com/xBandaku"><img src="https://github.com/xBandaku.png" width="60px" alt="xPandaku" /></a><a href="https://github.com/claudemods"><img src="https://github.com/claudemods.png" width="60px" alt="Claudemods" /></a><a href="https://github.com/hkolatan"><img src="https://github.com/hkolatan.png" width="60px" alt="Halil Kolatan" /></a><!-- sponsors -->
## 🏅 Thanks to all Contributors ## 🏅 Thanks to all Contributors
Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻.

View File

@ -1,3 +1,3 @@
--8<-- "CONTRIBUTING.md" --8<-- ".github/CONTRIBUTING.md"
<!-- The content is sourced from "CONTRIBUTING.md," located in the root directory of the project. --> <!-- The content is sourced from "CONTRIBUTING.md," located in the root directory of the project. -->

View File

@ -198,26 +198,7 @@ The utility provides three distinct settings for managing Windows updates: Defau
* Selecting a scratch directory will copy the contents of the ISO file to the directory you specify instead of an automatically generated folder in the `%TEMP%` directory. * Selecting a scratch directory will copy the contents of the ISO file to the directory you specify instead of an automatically generated folder in the `%TEMP%` directory.
* You can select an edition of Windows to debloat (**SKU**) using the convenient drop-down menu. * You can select an edition of Windows to debloat (**SKU**) using the convenient drop-down menu.
    By default, MicroWin will debloat the Pro edition, but you can choose any edition you want. By default, MicroWin will debloat the Pro edition, but you can choose any edition you want.
##### Customization options
* **Keep Provisioned Packages**: leaving this option unticked (default) will try to remove every operating system package.
    Some packages may remain after processing. This can happen if the packages in question are permanent or have been superseded by newer versions.
* **Keep Appx Packages**: leaving this option unticked (default) will try to remove every Microsoft Store app from the Windows image.
    This option will exclude some applications that are essential in the event that you want or need to add a Store app later on.
* **Keep Defender**: leaving this option unticked will try to remove every part of Windows Defender, including the Windows Security app.
    Leaving this option unticked is **NOT recommended** unless you plan to use a third-party antivirus solution on your MicroWin installation. In that regard, don't install AVs with bad reputations or rogueware.
* **Keep Edge**: leaving this option unticked will try to remove every part of the Microsoft Edge browser using the best methods available.
    Leaving this option unticked is not recommended because it might break some applications that might depend on the `Edge WebView2` runtime. However, if that happens, you can easily [reinstall it](https://developer.microsoft.com/en-us/microsoft-edge/webview2)
##### Driver integration options ##### Driver integration options
@ -225,7 +206,15 @@ The utility provides three distinct settings for managing Windows updates: Defau
* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image. * **Inject drivers** will add the drivers in the folder that you specify to the target Windows image.
* **Import drivers from the current system** will add every third-party driver that is present in your active installation. * **Import drivers from the current system** will add every third-party driver that is present in your active installation.
    This makes the target image have the same hardware compatibility as the active installation. However, this means that you will only be able to install the target Windows image and take full advantage of it on computers with **the same hardware**. To avoid this, you'll need to customize the `install.wim` file of the target ISO in the 'sources` folder. This makes the target image have the same hardware compatibility as the active installation. However, this means that you will only be able to install the target Windows image and take full advantage of it on computers with **the same hardware**. To avoid this, you'll need to customize the `install.wim` file of the target ISO in the 'sources` folder.
##### Custom user settings
With MicroWin, you can also configure your user before proceeding if you don't want to use the default `User` account. To do this, simply type the account name (20 characters maximum), and a password. Then, let MicroWin do the rest.
!!! info
Please make sure that you remember your password. MicroWin will configure auto-login settings, so you won't have to enter your password. However, if you are required to enter your password, it's best that you don't forget it.
##### Ventoy options ##### Ventoy options

View File

@ -101,7 +101,9 @@ function Remove-Packages {
$_ -NotLike "*DesktopAppInstaller*" -AND $_ -NotLike "*DesktopAppInstaller*" -AND
$_ -NotLike "*WebMediaExtensions*" -AND $_ -NotLike "*WebMediaExtensions*" -AND
$_ -NotLike "*WMIC*" -AND $_ -NotLike "*WMIC*" -AND
$_ -NotLike "*UI.XaML*" $_ -NotLike "*UI.XaML*" -AND
$_ -NotLike "*Ethernet*" -AND
$_ -NotLike "*Wifi*"
} }
foreach ($pkg in $pkglist) { foreach ($pkg in $pkglist) {
@ -132,6 +134,8 @@ function Remove-ProvisionedPackages() {
.EXAMPLE .EXAMPLE
Remove-ProvisionedPackages Remove-ProvisionedPackages
#> #>
try
{
$appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object { $appxProvisionedPackages = Get-AppxProvisionedPackage -Path "$($scratchDir)" | Where-Object {
$_.PackageName -NotLike "*AppInstaller*" -AND $_.PackageName -NotLike "*AppInstaller*" -AND
$_.PackageName -NotLike "*Store*" -and $_.PackageName -NotLike "*Store*" -and
@ -141,7 +145,6 @@ function Remove-ProvisionedPackages() {
$_.PackageName -NotLike "*LanguageFeatures*" -and $_.PackageName -NotLike "*LanguageFeatures*" -and
$_.PackageName -NotLike "*Notepad*" -and $_.PackageName -NotLike "*Notepad*" -and
$_.PackageName -NotLike "*Printing*" -and $_.PackageName -NotLike "*Printing*" -and
$_.PackageName -NotLike "*Wifi*" -and
$_.PackageName -NotLike "*Foundation*" -and $_.PackageName -NotLike "*Foundation*" -and
$_.PackageName -NotLike "*YourPhone*" -and $_.PackageName -NotLike "*YourPhone*" -and
$_.PackageName -NotLike "*Xbox*" -and $_.PackageName -NotLike "*Xbox*" -and
@ -153,7 +156,6 @@ function Remove-ProvisionedPackages() {
$_.PackageName -NotLike "*Gaming*" -and $_.PackageName -NotLike "*Gaming*" -and
$_.PackageName -NotLike "*Extension*" -and $_.PackageName -NotLike "*Extension*" -and
$_.PackageName -NotLike "*SecHealthUI*" $_.PackageName -NotLike "*SecHealthUI*"
} }
$counter = 0 $counter = 0
@ -168,6 +170,12 @@ function Remove-ProvisionedPackages() {
} }
} }
Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed Write-Progress -Activity "Removing Provisioned Apps" -Status "Ready" -Completed
}
catch
{
# This can happen if getting AppX packages fails
Write-Host "Unable to get information about the AppX packages. MicroWin processing will continue, but AppX packages will not be processed"
}
} }
function Copy-ToUSB([string]$fileToCopy) { function Copy-ToUSB([string]$fileToCopy) {
@ -239,6 +247,11 @@ function Remove-FileOrDirectory([string]$pathToDelete, [string]$mask = "", [swit
function New-Unattend { function New-Unattend {
param (
[Parameter(Mandatory, Position = 0)] [string]$userName,
[Parameter(Position = 1)] [string] $userPassword
)
$unattend = @' $unattend = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" <unattend xmlns="urn:schemas-microsoft-com:unattend"
@ -261,21 +274,21 @@ function New-Unattend {
<UserAccounts> <UserAccounts>
<LocalAccounts> <LocalAccounts>
<LocalAccount wcm:action="add"> <LocalAccount wcm:action="add">
<Name>User</Name> <Name>USER-REPLACEME</Name>
<Group>Administrators</Group> <Group>Administrators</Group>
<Password> <Password>
<Value></Value> <Value>PW-REPLACEME</Value>
<PlainText>true</PlainText> <PlainText>true</PlainText>
</Password> </Password>
</LocalAccount> </LocalAccount>
</LocalAccounts> </LocalAccounts>
</UserAccounts> </UserAccounts>
<AutoLogon> <AutoLogon>
<Username>User</Username> <Username>USER-REPLACEME</Username>
<Enabled>true</Enabled> <Enabled>true</Enabled>
<LogonCount>1</LogonCount> <LogonCount>1</LogonCount>
<Password> <Password>
<Value></Value> <Value>PW-REPLACEME</Value>
<PlainText>true</PlainText> <PlainText>true</PlainText>
</Password> </Password>
</AutoLogon> </AutoLogon>
@ -535,6 +548,11 @@ function New-Unattend {
# Replace the placeholder text with the Specialize pass # Replace the placeholder text with the Specialize pass
$unattend = $unattend.Replace("<#REPLACEME#>", $specPass).Trim() $unattend = $unattend.Replace("<#REPLACEME#>", $specPass).Trim()
} }
# Replace default User and Password values with the provided parameters
$unattend = $unattend.Replace("USER-REPLACEME", $userName).Trim()
$unattend = $unattend.Replace("PW-REPLACEME", $userPassword).Trim()
# Save unattended answer file with UTF-8 encoding
$unattend | Out-File -FilePath "$env:temp\unattend.xml" -Force -Encoding utf8 $unattend | Out-File -FilePath "$env:temp\unattend.xml" -Force -Encoding utf8
} }

View File

@ -62,6 +62,8 @@ function Invoke-WPFGetIso {
} }
} }
if ($sync["ISOoption2"].IsChecked) {
# Open file dialog to let user choose the ISO file
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null
$openFileDialog = New-Object System.Windows.Forms.OpenFileDialog $openFileDialog = New-Object System.Windows.Forms.OpenFileDialog
$openFileDialog.initialDirectory = $initialDirectory $openFileDialog.initialDirectory = $initialDirectory
@ -74,6 +76,20 @@ function Invoke-WPFGetIso {
$sync.BusyMessage.Visibility="Hidden" $sync.BusyMessage.Visibility="Hidden"
return return
} }
} elseif ($sync["ISOoption1"].IsChecked) {
# Auto download newest ISO
# Credit: https://github.com/pbatard/Fido
$fidopath = "$env:temp\Fido.ps1"
$originalLocation = Get-Location
Invoke-WebRequest "https://github.com/pbatard/Fido/raw/master/Fido.ps1" -OutFile $fidopath
# TODO: Have to correct the language to actually be a working one
Set-Location -Path $env:temp
& $fidopath -Win 'Windows 11' -Rel $sync["ISORelease"].SelectedItem -Arch "x64"
Set-Location $originalLocation
$filePath = Get-ChildItem -Path "$env:temp" -Filter "Win11*.iso" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
}
Write-Host "File path $($filePath)" Write-Host "File path $($filePath)"
if (-not (Test-Path -Path "$filePath" -PathType Leaf)) { if (-not (Test-Path -Path "$filePath" -PathType Leaf)) {

View File

@ -178,7 +178,22 @@ public class PowerManagement {
Write-Host "Removal complete!" Write-Host "Removal complete!"
Write-Host "Create unattend.xml" Write-Host "Create unattend.xml"
New-Unattend #New-Unattend
if ($sync.MicrowinUserName.Text -eq "")
{
New-Unattend -userName "User"
}
else
{
if ($sync.MicrowinUserPassword.Password -eq "")
{
New-Unattend -userName "$($sync.MicrowinUserName.Text)"
}
else
{
New-Unattend -userName "$($sync.MicrowinUserName.Text)" -userPassword "$($sync.MicrowinUserPassword.Password)"
}
}
Write-Host "Done Create unattend.xml" Write-Host "Done Create unattend.xml"
Write-Host "Copy unattend.xml file into the ISO" Write-Host "Copy unattend.xml file into the ISO"
New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\Panther" New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\Panther"
@ -248,8 +263,11 @@ public class PowerManagement {
# reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null # reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null
# When in Offline Image # When in Offline Image
if (Test-Path "HKLM:\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_")
{
reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null
} }
}
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
Write-Host "Setting all services to start manually" Write-Host "Setting all services to start manually"

View File

@ -1,4 +0,0 @@
Get-ChildItem @(
"$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package*.mum",
"$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package*.mum"
) | ForEach-Object { dism.exe /online /norestart /add-package:"$_" }

View File

@ -356,6 +356,27 @@ Add-Type @"
}) })
$locale = (Get-Culture).Name
$sync["ISORelease"].Items.Add("23H2")
$sync["ISORelease"].Items.Add("22H2")
$sync["ISORelease"].Items.Add("21H2")
$sync["ISORelease"].SelectedItem = "23H2"
$sync["ISOLanguage"].Items.Add($locale)
if ($locale -ne "en-US") {
$sync["ISOLanguage"].Items.Add("en-US")
}
$sync["ISOLanguage"].SelectedItem = $locale
if ($sync["ISOoption1"].IsChecked) {
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Visible
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Visible
} else {
$sync["ISORelease"].Visibility = [System.Windows.Visibility]::Collapsed
$sync["ISOLanguage"].Visibility = [System.Windows.Visibility]::Collapsed
}
# Load Checkboxes and Labels outside of the Filter function only once on startup for performance reasons # Load Checkboxes and Labels outside of the Filter function only once on startup for performance reasons
$filter = Get-WinUtilVariables -Type CheckBox $filter = Get-WinUtilVariables -Type CheckBox
$CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter } $CheckBoxes = ($sync.GetEnumerator()).where{ $psitem.Key -in $filter }

View File

@ -563,17 +563,17 @@ function Add-LinkAttributeToJson {
} }
Update-Progress "Loading JSON files" 10 Update-Progress "Loading JSON files" 10
$tweaks = Get-Content -Path "config/tweaks.json" | ConvertFrom-Json $tweaks = Get-Content -Path "../config/tweaks.json" | ConvertFrom-Json
$features = Get-Content -Path "config/feature.json" | ConvertFrom-Json $features = Get-Content -Path "../config/feature.json" | ConvertFrom-Json
Update-Progress "Getting last modified dates of the JSON files" 20 Update-Progress "Getting last modified dates of the JSON files" 20
$tweaksLastModified = (Get-Item "config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd") $tweaksLastModified = (Get-Item "../config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd")
$featuresLastModified = (Get-Item "config/feature.json").LastWriteTime.ToString("yyyy-MM-dd") $featuresLastModified = (Get-Item "../config/feature.json").LastWriteTime.ToString("yyyy-MM-dd")
$tweaksOutputDir = "docs/dev/tweaks" $tweaksOutputDir = "../docs/dev/tweaks"
$featuresOutputDir = "docs/dev/features" $featuresOutputDir = "../docs/dev/features"
$privateFunctionsDir = "functions/private" $privateFunctionsDir = "../functions/private"
$publicFunctionsDir = "functions/public" $publicFunctionsDir = "../functions/public"
$functions = @{} $functions = @{}
$itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?" $itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?"
@ -592,7 +592,7 @@ Load-Functions -dir $publicFunctionsDir
Update-Progress "Adding documentation links to JSON files" 50 Update-Progress "Adding documentation links to JSON files" 50
# Define the JSON file paths # Define the JSON file paths
$jsonPaths = @(".\config\feature.json", ".\config\tweaks.json") $jsonPaths = @("../config/feature.json", "../config/tweaks.json")
# Loop through each JSON file path # Loop through each JSON file path
foreach ($jsonPath in $jsonPaths) { foreach ($jsonPath in $jsonPaths) {
@ -612,12 +612,12 @@ foreach ($jsonPath in $jsonPaths) {
Set-Content -Path $jsonPath -Value $jsonString Set-Content -Path $jsonPath -Value $jsonString
} }
Add-LinkAttributeToJson -jsonFilePath "config/tweaks.json" -outputDir "dev/tweaks" Add-LinkAttributeToJson -jsonFilePath "../config/tweaks.json" -outputDir "dev/tweaks"
Add-LinkAttributeToJson -jsonFilePath "config/feature.json" -outputDir "dev/features" Add-LinkAttributeToJson -jsonFilePath "../config/feature.json" -outputDir "dev/features"
Update-Progress "Generating content for documentation" 60 Update-Progress "Generating content for documentation" 60
$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60 $tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "../config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60
$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70 $featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "../config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70
Update-Progress "Generating table of contents" 80 Update-Progress "Generating table of contents" 80
$allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries $allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries
@ -639,6 +639,6 @@ $indexContent += Process-MultilineStrings @"
\\ \\
"@ "@
$indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n" $indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n"
Set-Content -Path "docs/devdocs.md" -Value $indexContent -Encoding utf8 Set-Content -Path "../docs/devdocs.md" -Value $indexContent -Encoding utf8
Update-Progress "Process Completed" 100 Update-Progress "Process Completed" 100

View File

@ -340,6 +340,47 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style TargetType="RadioButton">
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
<Setter Property="Background" Value="{MainBackgroundColor}"/>
<Setter Property="FontSize" Value="{FontSize}" />
<Setter Property="FontFamily" Value="{FontFamily}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<StackPanel Orientation="Horizontal" Margin="{CheckBoxMargin}">
<Grid Width="14" Height="14">
<Ellipse x:Name="OuterCircle"
Stroke="{ButtonBackgroundPressedColor}"
Fill="{ButtonBackgroundColor}"
StrokeThickness="1"
Width="14"
Height="14"
SnapsToDevicePixels="True"/>
<Ellipse x:Name="InnerCircle"
Fill="{MainForegroundColor}"
Width="8"
Height="8"
Visibility="Collapsed"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Grid>
<ContentPresenter Margin="4,0,0,0"
VerticalAlignment="Center"
RecognizesAccessKey="True"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="InnerCircle" Property="Visibility" Value="Visible"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="OuterCircle" Property="Stroke" Value="{BorderColor}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ToggleSwitchStyle" TargetType="CheckBox"> <Style x:Key="ToggleSwitchStyle" TargetType="CheckBox">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
@ -566,6 +607,36 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
<Style TargetType="PasswordBox">
<Setter Property="Background" Value="{MainBackgroundColor}"/>
<Setter Property="BorderBrush" Value="{MainForegroundColor}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
<Setter Property="FontSize" Value="{FontSize}"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="PasswordBox">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="5">
<Grid>
<ScrollViewer x:Name="PART_ContentHost" />
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect ShadowDepth="5" BlurRadius="5" Opacity="{BorderOpacity}" Color="{BorderColor}"/>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle"> <Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
<Setter Property="Visibility" Value="Collapsed"/> <Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers> <Style.Triggers>
@ -895,10 +966,14 @@
TextWrapping="Wrap" TextWrapping="Wrap"
Foreground="{LabelboxForegroundColor}" Foreground="{LabelboxForegroundColor}"
/> />
<RadioButton x:Name="ISOoption1" Content="Get newest ISO automatically" GroupName="Options" IsChecked="True"/>
<ComboBox x:Name="ISORelease"/>
<ComboBox x:Name="ISOLanguage"/>
<RadioButton x:Name="ISOoption2" Content="Select your own ISO" GroupName="Options"/>
<Button Name="WPFGetIso" Margin="2" Padding="15"> <Button Name="WPFGetIso" Margin="2" Padding="15">
<Button.Content> <Button.Content>
<TextBlock Background="Transparent" Foreground="{ButtonForegroundColor}"> <TextBlock Background="Transparent" Foreground="{ButtonForegroundColor}">
Select Windows <Underline>I</Underline>SO Get Windows <Underline>I</Underline>SO
</TextBlock> </TextBlock>
</Button.Content> </Button.Content>
</Button> </Button>
@ -921,6 +996,23 @@
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> <Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="-10,5,0,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/> <CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="-10,5,0,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/> <Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Custom user settings (leave empty for default user)</Bold></TextBlock>
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">User name (20 characters max.):</TextBlock>
<TextBox Name="MicrowinUserName" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
Margin="6"
Text=""
IsReadOnly="False"
TextWrapping="Wrap"
Foreground="{LabelboxForegroundColor}"
MaxLength="20"
/>
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Password (characters will not be shown for your security):</TextBlock>
<PasswordBox Name="MicrowinUserPassword" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
Margin="6"
PasswordChar="*"
Foreground="{LabelboxForegroundColor}"
/>
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/> <Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
</StackPanel> </StackPanel>
<StackPanel HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Collapsed"> <StackPanel HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Collapsed">
@ -968,15 +1060,14 @@
Foreground="{ComboBoxForegroundColor}"> Foreground="{ComboBoxForegroundColor}">
<Bold>MicroWin features:</Bold><LineBreak/> <Bold>MicroWin features:</Bold><LineBreak/>
- Remove Telemetry and Tracking <LineBreak/> - Remove Telemetry and Tracking <LineBreak/>
- Fast Install using "User" local account <LineBreak/> - Fast Install using either the "User" local account or the account of your choosing <LineBreak/>
- No internet requirement for install <LineBreak/> - No internet requirement for install <LineBreak/>
- Apps debloat <LineBreak/> - Apps debloat <LineBreak/>
<LineBreak/> <LineBreak/>
<LineBreak/> <LineBreak/>
<Bold>INSTRUCTIONS</Bold> <LineBreak/> <Bold>INSTRUCTIONS</Bold> <LineBreak/>
- Download the latest Windows 11 image from Microsoft <LineBreak/> - <TextBlock Name="Win11DownloadLink" Style="{StaticResource HoverTextBlockStyle}" ToolTip="https://www.microsoft.com/software-download/windows11">Download</TextBlock> the latest Windows 11 image from Microsoft <LineBreak/>
LINK: https://www.microsoft.com/software-download/windows11 <LineBreak/>
May take several minutes to process the ISO depending on your machine and connection <LineBreak/> May take several minutes to process the ISO depending on your machine and connection <LineBreak/>
- Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/> - Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/>
- Launch WinUtil and MicroWin <LineBreak/> - Launch WinUtil and MicroWin <LineBreak/>