Skip to content

Commit 8e9c05a

Browse files
mews-seJustin HornerReal-MullaCCodingWonders
authored
update (#2)
* Make "Download" a direct link to download the latest Win11 ISO (ChrisTitusTech#2574) * Auto pushes docs (ChrisTitusTech#2580) * [MicroWin] Add custom user settings and other changes (docs/bugfixes) (ChrisTitusTech#2575) * [MicroWin] Add custom user settings * Update inputXML.xaml * Update MicroWin documentation to reflect changes * Update Invoke-WinUtilMicroWin-Helper.ps1 * Update Invoke-WPFMicrowin.ps1 --------- Co-authored-by: Justin Horner <[email protected]> Co-authored-by: Real-MullaC <[email protected]> Co-authored-by: CodingWonders <[email protected]>
1 parent 145971b commit 8e9c05a

File tree

5 files changed

+103
-39
lines changed

5 files changed

+103
-39
lines changed

Diff for: .github/workflows/github-pages.yaml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
name: GitHub Pages Deploy
22

33
on:
4-
release:
5-
types: [published, prereleased]
4+
push:
5+
paths:
6+
- '.github/mkdocs.yml'
7+
- '.github/requirements.txt'
8+
- 'docs/**'
9+
- 'overrides/**'
610
workflow_dispatch:
711

8-
permissions:
9-
contents: write
10-
1112
jobs:
12-
deploy:
13+
build-and-deploy:
1314
runs-on: ubuntu-latest
1415

1516
steps:
@@ -22,10 +23,10 @@ jobs:
2223
uses: actions/setup-python@v5
2324
with:
2425
python-version: 3.x # Install latest Stable release of Python 3
25-
cache: 'pip' # caching pip dependencies
26+
cache: 'pip' # Caching pip dependencies
2627

27-
- name: Install Necessary Dependencies using 'pip install -r .github/requirements.txt'
28+
- name: Install Necessary Dependencies
2829
run: pip install -r .github/requirements.txt
2930

30-
- name: Build & Deploy using 'mkdocs'
31-
run: mkdocs gh-deploy --force -f .github/mkdocs.yml
31+
- name: Build & Deploy using mkdocs
32+
run: mkdocs gh-deploy --force -f .github/mkdocs.yml

Diff for: docs/userguide.md

+9-20
Original file line numberDiff line numberDiff line change
@@ -198,34 +198,23 @@ The utility provides three distinct settings for managing Windows updates: Defau
198198
* 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.
199199
* You can select an edition of Windows to debloat (**SKU**) using the convenient drop-down menu.
200200

201-
    By default, MicroWin will debloat the Pro edition, but you can choose any edition you want.
201+
By default, MicroWin will debloat the Pro edition, but you can choose any edition you want.
202202

203203

204-
##### Customization options
205-
206-
* **Keep Provisioned Packages**: leaving this option unticked (default) will try to remove every operating system package.
207-
208-
    Some packages may remain after processing. This can happen if the packages in question are permanent or have been superseded by newer versions.
209-
210-
* **Keep Appx Packages**: leaving this option unticked (default) will try to remove every Microsoft Store app from the Windows image.
211-
212-
    This option will exclude some applications that are essential in the event that you want or need to add a Store app later on.
213-
214-
* **Keep Defender**: leaving this option unticked will try to remove every part of Windows Defender, including the Windows Security app.
215-
216-
    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.
204+
##### Driver integration options
217205

218-
* **Keep Edge**: leaving this option unticked will try to remove every part of the Microsoft Edge browser using the best methods available.
206+
* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image.
207+
* **Import drivers from the current system** will add every third-party driver that is present in your active installation.
219208

220-
    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)
209+
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.
221210

211+
##### Custom user settings
222212

223-
##### Driver integration options
213+
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.
224214

225-
* **Inject drivers** will add the drivers in the folder that you specify to the target Windows image.
226-
* **Import drivers from the current system** will add every third-party driver that is present in your active installation.
215+
!!! info
227216

228-
    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.
217+
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.
229218

230219

231220
##### Ventoy options

Diff for: functions/private/Invoke-WinUtilMicroWin-Helper.ps1

+14-4
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ function Remove-FileOrDirectory([string]$pathToDelete, [string]$mask = "", [swit
243243

244244
function New-Unattend {
245245

246+
param (
247+
[Parameter(Mandatory, Position = 0)] [string] $userName,
248+
[Parameter(Position = 1)] [string] $userPassword
249+
)
250+
246251
$unattend = @'
247252
<?xml version="1.0" encoding="utf-8"?>
248253
<unattend xmlns="urn:schemas-microsoft-com:unattend"
@@ -265,21 +270,21 @@ function New-Unattend {
265270
<UserAccounts>
266271
<LocalAccounts>
267272
<LocalAccount wcm:action="add">
268-
<Name>User</Name>
273+
<Name>USER-REPLACEME</Name>
269274
<Group>Administrators</Group>
270275
<Password>
271-
<Value></Value>
276+
<Value>PW-REPLACEME</Value>
272277
<PlainText>true</PlainText>
273278
</Password>
274279
</LocalAccount>
275280
</LocalAccounts>
276281
</UserAccounts>
277282
<AutoLogon>
278-
<Username>User</Username>
283+
<Username>USER-REPLACEME</Username>
279284
<Enabled>true</Enabled>
280285
<LogonCount>1</LogonCount>
281286
<Password>
282-
<Value></Value>
287+
<Value>PW-REPLACEME</Value>
283288
<PlainText>true</PlainText>
284289
</Password>
285290
</AutoLogon>
@@ -539,6 +544,11 @@ function New-Unattend {
539544
# Replace the placeholder text with the Specialize pass
540545
$unattend = $unattend.Replace("<#REPLACEME#>", $specPass).Trim()
541546
}
547+
# Replace default User and Password values with the provided parameters
548+
$unattend = $unattend.Replace("USER-REPLACEME", $userName).Trim()
549+
$unattend = $unattend.Replace("PW-REPLACEME", $userPassword).Trim()
550+
551+
# Save unattended answer file with UTF-8 encoding
542552
$unattend | Out-File -FilePath "$env:temp\unattend.xml" -Force -Encoding utf8
543553
}
544554

Diff for: functions/public/Invoke-WPFMicrowin.ps1

+20-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,22 @@ public class PowerManagement {
178178
Write-Host "Removal complete!"
179179

180180
Write-Host "Create unattend.xml"
181-
New-Unattend
181+
#New-Unattend
182+
if ($sync.MicrowinUserName.Text -eq "")
183+
{
184+
New-Unattend -userName "User"
185+
}
186+
else
187+
{
188+
if ($sync.MicrowinUserPassword.Password -eq "")
189+
{
190+
New-Unattend -userName "$($sync.MicrowinUserName.Text)"
191+
}
192+
else
193+
{
194+
New-Unattend -userName "$($sync.MicrowinUserName.Text)" -userPassword "$($sync.MicrowinUserPassword.Password)"
195+
}
196+
}
182197
Write-Host "Done Create unattend.xml"
183198
Write-Host "Copy unattend.xml file into the ISO"
184199
New-Item -ItemType Directory -Force -Path "$($scratchDir)\Windows\Panther"
@@ -248,7 +263,10 @@ public class PowerManagement {
248263
# reg delete "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Orchestrator\UScheduler\$_" /f | Out-Null
249264

250265
# When in Offline Image
251-
reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null
266+
if (Test-Path "HKLM:\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_")
267+
{
268+
reg delete "HKLM\zSOFTWARE\Microsoft\WindowsUpdate\Orchestrator\UScheduler_Oobe\$_" /f | Out-Null
269+
}
252270
}
253271

254272
reg add "HKLM\zSOFTWARE\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f

Diff for: xaml/inputXML.xaml

+49-3
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,36 @@
566566
</Setter.Value>
567567
</Setter>
568568
</Style>
569+
<Style TargetType="PasswordBox">
570+
<Setter Property="Background" Value="{MainBackgroundColor}"/>
571+
<Setter Property="BorderBrush" Value="{MainForegroundColor}"/>
572+
<Setter Property="BorderThickness" Value="1"/>
573+
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
574+
<Setter Property="FontSize" Value="{FontSize}"/>
575+
<Setter Property="Padding" Value="5"/>
576+
<Setter Property="HorizontalAlignment" Value="Stretch"/>
577+
<Setter Property="VerticalAlignment" Value="Center"/>
578+
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
579+
<Setter Property="Template">
580+
<Setter.Value>
581+
<ControlTemplate TargetType="PasswordBox">
582+
<Border Background="{TemplateBinding Background}"
583+
BorderBrush="{TemplateBinding BorderBrush}"
584+
BorderThickness="{TemplateBinding BorderThickness}"
585+
CornerRadius="5">
586+
<Grid>
587+
<ScrollViewer x:Name="PART_ContentHost" />
588+
</Grid>
589+
</Border>
590+
</ControlTemplate>
591+
</Setter.Value>
592+
</Setter>
593+
<Setter Property="Effect">
594+
<Setter.Value>
595+
<DropShadowEffect ShadowDepth="5" BlurRadius="5" Opacity="{BorderOpacity}" Color="{BorderColor}"/>
596+
</Setter.Value>
597+
</Setter>
598+
</Style>
569599
<Style x:Key="ScrollVisibilityRectangle" TargetType="Rectangle">
570600
<Setter Property="Visibility" Value="Collapsed"/>
571601
<Style.Triggers>
@@ -921,6 +951,23 @@
921951
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
922952
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="-10,5,0,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
923953
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
954+
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Custom user settings (leave empty for default user)</Bold></TextBlock>
955+
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">User name (20 characters max.):</TextBlock>
956+
<TextBox Name="MicrowinUserName" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
957+
Margin="6"
958+
Text=""
959+
IsReadOnly="False"
960+
TextWrapping="Wrap"
961+
Foreground="{LabelboxForegroundColor}"
962+
MaxLength="20"
963+
/>
964+
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Password (characters will not be shown for your security):</TextBlock>
965+
<PasswordBox Name="MicrowinUserPassword" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
966+
Margin="6"
967+
PasswordChar="*"
968+
Foreground="{LabelboxForegroundColor}"
969+
/>
970+
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
924971
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
925972
</StackPanel>
926973
<StackPanel HorizontalAlignment="Left" SnapsToDevicePixels="True" Margin="1" Visibility="Collapsed">
@@ -968,15 +1015,14 @@
9681015
Foreground="{ComboBoxForegroundColor}">
9691016
<Bold>MicroWin features:</Bold><LineBreak/>
9701017
- Remove Telemetry and Tracking <LineBreak/>
971-
- Fast Install using "User" local account <LineBreak/>
1018+
- Fast Install using either the "User" local account or the account of your choosing <LineBreak/>
9721019
- No internet requirement for install <LineBreak/>
9731020
- Apps debloat <LineBreak/>
9741021
<LineBreak/>
9751022
<LineBreak/>
9761023

9771024
<Bold>INSTRUCTIONS</Bold> <LineBreak/>
978-
- Download the latest Windows 11 image from Microsoft <LineBreak/>
979-
LINK: https://www.microsoft.com/software-download/windows11 <LineBreak/>
1025+
- <TextBlock Name="Win11DownloadLink" Style="{StaticResource HoverTextBlockStyle}" ToolTip="https://www.microsoft.com/software-download/windows11">Download</TextBlock> the latest Windows 11 image from Microsoft <LineBreak/>
9801026
May take several minutes to process the ISO depending on your machine and connection <LineBreak/>
9811027
- Put it somewhere on the C:\ drive so it is easily accessible <LineBreak/>
9821028
- Launch WinUtil and MicroWin <LineBreak/>

0 commit comments

Comments
 (0)