Skip to content

Commit 54e367a

Browse files
[MicroWin] 25H2 preparation (#3543)
* [Enhance] Configure all apps view in start menu To keep look consistent with older Win11 * [Enhance] Additional Start menu settings * [MicroWin] Change Write-Host to Write-Debug on debug lines. (#13) * Add a resolution to scripts being disabled (#14) * [MicroWin] Change Write-Host to Write-Debug on debug lines. * Add a resolution to scripts being disabled * Add skip first logon anim option * Unrelated: indentation fixes from compile script * Some little touches to the first-run script --------- Co-authored-by: Real-MullaC <callumjanes2007new+github@gmail.com>
1 parent e2e9089 commit 54e367a

File tree

6 files changed

+62
-31
lines changed

6 files changed

+62
-31
lines changed

functions/microwin/Invoke-Microwin.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public class PowerManagement {
6060

6161
$WPBT = $sync.MicroWinWPBT.IsChecked
6262
$unsupported = $sync.MicroWinUnsupported.IsChecked
63+
$skipFla = $sync.MicroWinNoFLA.IsChecked
6364

6465
$importVirtIO = $sync.MicrowinCopyVirtIO.IsChecked
6566

@@ -181,6 +182,15 @@ public class PowerManagement {
181182
reg unload HKLM\zSYSTEM
182183
}
183184

185+
if ($skipFla) {
186+
Write-Host "Skipping first logon animation..."
187+
reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE"
188+
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f
189+
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /ve /t REG_SZ /d "Stop First Logon Animation Process" /f
190+
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /v StubPath /t REG_EXPAND_SZ /d '""%WINDIR%\System32\cmd.exe"" /C ""taskkill /f /im firstlogonanim.exe""' /f
191+
reg unload HKLM\zSOFTWARE
192+
}
193+
184194
if ($unsupported) {
185195
Write-Host "Bypassing system requirements (locally)"
186196
reg add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f

functions/microwin/Invoke-MicrowinGetIso.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function Invoke-MicrowinGetIso {
44
Function to get the path to Iso file for MicroWin, unpack that isom=, read basic information and populate the UI Options
55
#>
66

7-
Write-Host "Invoking WPFGetIso"
7+
Write-Debug "Invoking WPFGetIso"
88

99
if($sync.ProcessRunning) {
1010
$msg = "GetIso process is currently running."
@@ -77,6 +77,7 @@ function Invoke-MicrowinGetIso {
7777
if (-not $?)
7878
{
7979
Write-Host "Could not download the ISO file. Look at the output of the console for more information."
80+
Write-Host "If you get an error about scripts is disabled on this system please close WinUtil and run - 'Set-ExecutionPolicy -ExecutionPolicy Unrestricted' and select 'A' and retry using MicroWin again."
8081
$msg = "The ISO file could not be downloaded"
8182
Invoke-MicrowinBusyInfo -action "warning" -message $msg
8283
Set-WinUtilTaskbaritem -state "Error" -value 1 -overlay "warning"

functions/microwin/Microwin-NewFirstRun.ps1

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ function Microwin-NewFirstRun {
3434
3535
$taskbarPath = "$env:AppData\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
3636
# Delete all files on the Taskbar
37-
Get-ChildItem -Path $taskbarPath -File | Remove-Item -Force
37+
if (Test-Path "$taskbarPath") {
38+
Get-ChildItem -Path $taskbarPath -File | Remove-Item -Force
39+
}
3840
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesRemovedChanges"
3941
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "FavoritesChanges"
4042
Remove-RegistryValue -RegistryPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" -ValueName "Favorites"
@@ -88,6 +90,23 @@ function Microwin-NewFirstRun {
8890
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /f
8991
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.AccountHealth" /v Enabled /t REG_DWORD /d 0 /f
9092
93+
# This will set List view in Start menu on Win11 25H2. This will not do anything in 24H2 and older
94+
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v AllAppsViewMode /t REG_DWORD /d 2 /f
95+
96+
# This will disable the Recommendations in 25H2. This is much simpler than the method used in 24H2 that requires the Education Environment policy
97+
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_IrisRecommendations /t REG_DWORD /d 0 /f
98+
99+
# Other Start Menu settings
100+
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_AccountNotifications /t REG_DWORD /d 0 /f
101+
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowAllPinsList /t REG_DWORD /d 0 /f
102+
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowFrequentList /t REG_DWORD /d 0 /f
103+
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Start" /v ShowRecentList /t REG_DWORD /d 0 /f
104+
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackDocs /t REG_DWORD /d 0 /f
105+
106+
Clear-Host
107+
Write-Host "The taskbar will take around a minute to show up, but you can start using your computer now. Try pressing the Windows key to open the Start menu, or Windows + E to launch File Explorer."
108+
Start-Sleep -Seconds 10
109+
91110
if (Test-Path -Path "$env:HOMEDRIVE\winutil-config.json")
92111
{
93112
Write-Host "Configuration file detected. Applying..."

functions/public/Invoke-WPFUpdatesdefault.ps1

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ function Invoke-WPFUpdatesdefault {
55
Resets Windows Update settings to default
66
77
#>
8-
8+
99
Write-Host "Restoring Windows Update registry settings..." -ForegroundColor Yellow
10-
10+
1111
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
1212
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
1313
}
@@ -25,7 +25,7 @@ function Invoke-WPFUpdatesdefault {
2525

2626
# Restore update services to their default state
2727
Write-Host "Restoring update services..." -ForegroundColor Yellow
28-
28+
2929
$services = @(
3030
@{Name = "BITS"; StartupType = "Manual"},
3131
@{Name = "wuauserv"; StartupType = "Manual"},
@@ -40,10 +40,10 @@ function Invoke-WPFUpdatesdefault {
4040
$serviceObj = Get-Service -Name $service.Name -ErrorAction SilentlyContinue
4141
if ($serviceObj) {
4242
Set-Service -Name $service.Name -StartupType $service.StartupType -ErrorAction SilentlyContinue
43-
43+
4444
# Reset failure actions to default using sc command
4545
Start-Process -FilePath "sc.exe" -ArgumentList "failure `"$($service.Name)`" reset= 86400 actions= restart/60000/restart/60000/restart/60000" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
46-
46+
4747
# Start the service if it should be running
4848
if ($service.StartupType -eq "Automatic") {
4949
Start-Service -Name $service.Name -ErrorAction SilentlyContinue
@@ -57,25 +57,25 @@ function Invoke-WPFUpdatesdefault {
5757

5858
# Restore renamed DLLs if they exist
5959
Write-Host "Restoring renamed update service DLLs..." -ForegroundColor Yellow
60-
60+
6161
$dlls = @("WaaSMedicSvc", "wuaueng")
62-
62+
6363
foreach ($dll in $dlls) {
6464
$dllPath = "C:\Windows\System32\$dll.dll"
6565
$backupPath = "C:\Windows\System32\${dll}_BAK.dll"
66-
66+
6767
if ((Test-Path $backupPath) -and !(Test-Path $dllPath)) {
6868
try {
6969
# Take ownership of backup file
7070
Start-Process -FilePath "takeown.exe" -ArgumentList "/f `"$backupPath`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
71-
71+
7272
# Grant full control to everyone
7373
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$backupPath`" /grant *S-1-1-0:F" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
74-
74+
7575
# Rename back to original
7676
Rename-Item -Path $backupPath -NewName "$dll.dll" -ErrorAction SilentlyContinue
7777
Write-Host "Restored ${dll}_BAK.dll to $dll.dll"
78-
78+
7979
# Restore ownership to TrustedInstaller
8080
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$dllPath`" /setowner `"NT SERVICE\TrustedInstaller`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
8181
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$dllPath`" /remove *S-1-1-0" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
@@ -88,7 +88,7 @@ function Invoke-WPFUpdatesdefault {
8888

8989
# Enable update related scheduled tasks
9090
Write-Host "Enabling update related scheduled tasks..." -ForegroundColor Yellow
91-
91+
9292
$taskPaths = @(
9393
'\Microsoft\Windows\InstallService\*'
9494
'\Microsoft\Windows\UpdateOrchestrator\*'
@@ -124,7 +124,7 @@ function Invoke-WPFUpdatesdefault {
124124
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "BranchReadinessLevel" -ErrorAction SilentlyContinue
125125
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferFeatureUpdatesPeriodInDays" -ErrorAction SilentlyContinue
126126
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" -Name "DeferQualityUpdatesPeriodInDays" -ErrorAction SilentlyContinue
127-
127+
128128
Write-Host "==================================================="
129129
Write-Host "--- Windows Update Settings Reset to Default ---"
130130
Write-Host "==================================================="
@@ -148,6 +148,6 @@ function Invoke-WPFUpdatesdefault {
148148
Write-Host "==================================================="
149149
Write-Host "--- Windows Local Policies Reset to Default ---"
150150
Write-Host "==================================================="
151-
151+
152152
Write-Host "Note: A system restart may be required for all changes to take full effect." -ForegroundColor Yellow
153153
}

functions/public/Invoke-WPFUpdatesdisable.ps1

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ function Invoke-WPFUpdatesdisable {
99
This function requires administrator privileges and will attempt to run as SYSTEM for certain operations.
1010
1111
#>
12-
12+
1313
Write-Host "Configuring registry settings..." -ForegroundColor Yellow
14-
14+
1515
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
1616
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null
1717
}
1818
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoUpdate" -Type DWord -Value 1
1919
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUOptions" -Type DWord -Value 1
20-
20+
2121
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) {
2222
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Force | Out-Null
2323
}
2424
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 0
25-
25+
2626
# Additional registry settings
2727
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" -Name "Start" -Type DWord -Value 4 -ErrorAction SilentlyContinue
2828
$failureActions = [byte[]](0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xd4,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,0x93,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00)
2929
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\WaaSMedicSvc" -Name "FailureActions" -Type Binary -Value $failureActions -ErrorAction SilentlyContinue
3030

3131
# Disable and stop update related services
3232
Write-Host "Disabling update services..." -ForegroundColor Yellow
33-
33+
3434
$services = @(
3535
"BITS"
3636
"wuauserv"
@@ -46,7 +46,7 @@ function Invoke-WPFUpdatesdisable {
4646
if ($serviceObj) {
4747
Stop-Service -Name $service -Force -ErrorAction SilentlyContinue
4848
Set-Service -Name $service -StartupType Disabled -ErrorAction SilentlyContinue
49-
49+
5050
# Set failure actions to nothing using sc command
5151
Start-Process -FilePath "sc.exe" -ArgumentList "failure `"$service`" reset= 0 actions= `"`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
5252
}
@@ -58,26 +58,26 @@ function Invoke-WPFUpdatesdisable {
5858

5959
# Rename critical update service DLLs (requires SYSTEM privileges)
6060
Write-Host "Attempting to rename critical update service DLLs..." -ForegroundColor Yellow
61-
61+
6262
$dlls = @("WaaSMedicSvc", "wuaueng")
63-
63+
6464
foreach ($dll in $dlls) {
6565
$dllPath = "C:\Windows\System32\$dll.dll"
6666
$backupPath = "C:\Windows\System32\${dll}_BAK.dll"
67-
67+
6868
if (Test-Path $dllPath) {
6969
try {
7070
# Take ownership
7171
Start-Process -FilePath "takeown.exe" -ArgumentList "/f `"$dllPath`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
72-
72+
7373
# Grant full control to everyone
7474
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$dllPath`" /grant *S-1-1-0:F" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
75-
75+
7676
# Rename file
7777
if (!(Test-Path $backupPath)) {
7878
Rename-Item -Path $dllPath -NewName "${dll}_BAK.dll" -ErrorAction SilentlyContinue
7979
Write-Host "Renamed $dll.dll to ${dll}_BAK.dll"
80-
80+
8181
# Restore ownership to TrustedInstaller
8282
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$backupPath`" /setowner `"NT SERVICE\TrustedInstaller`"" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
8383
Start-Process -FilePath "icacls.exe" -ArgumentList "`"$backupPath`" /remove *S-1-1-0" -Wait -WindowStyle Hidden -ErrorAction SilentlyContinue
@@ -91,7 +91,7 @@ function Invoke-WPFUpdatesdisable {
9191

9292
# Delete downloaded update files
9393
Write-Host "Cleaning up downloaded update files..." -ForegroundColor Yellow
94-
94+
9595
try {
9696
$softwareDistPath = "C:\Windows\SoftwareDistribution"
9797
if (Test-Path $softwareDistPath) {
@@ -105,7 +105,7 @@ function Invoke-WPFUpdatesdisable {
105105

106106
# Disable update related scheduled tasks
107107
Write-Host "Disabling update related scheduled tasks..." -ForegroundColor Yellow
108-
108+
109109
$taskPaths = @(
110110
'\Microsoft\Windows\InstallService\*'
111111
'\Microsoft\Windows\UpdateOrchestrator\*'
@@ -129,7 +129,7 @@ function Invoke-WPFUpdatesdisable {
129129
}
130130

131131
Write-Host "=================================" -ForegroundColor Green
132-
Write-Host "--- Updates ARE DISABLED ---" -ForegroundColor Green
132+
Write-Host "--- Updates ARE DISABLED ---" -ForegroundColor Green
133133
Write-Host "===================================" -ForegroundColor Green
134134
Write-Host "Note: Some operations may require a system restart to take full effect." -ForegroundColor Yellow
135135
}

xaml/inputXML.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,7 @@
14631463
<CheckBox Name="MicroWinWPBT" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="If enabled then allows your computer vendor to execute a program each time it boots. It enables computer vendors to force install anti-theft software, software drivers, or a software program conveniently. This could also be a security risk."><AccessText TextWrapping="Wrap" Text="Disable Windows Platform Binary Table (WPBT) (ADVANCED TWEAK)" /></CheckBox>
14641464
<CheckBox Name="MicroWinUnsupported" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="If enabled then it will allow you to upgrade your PC to Windows 11 if your PC does not support Windows 11 yet. This is good for if you do not have a USB and want to upgrade to Windows 11 on unsupported hardware."><AccessText TextWrapping="Wrap" Text="Allow this PC to upgrade to Windows 11" /></CheckBox>
14651465
<CheckBox Name="MicroWinESD" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="False" ToolTip="The ESD file format compresses the installation image even further, therefore reducing ISO file sizes a little more. Select this if you have a small USB."><AccessText TextWrapping="Wrap" Text="Convert this image to ESD (This will take longer)" /></CheckBox>
1466+
<CheckBox Name="MicroWinNoFLA" Margin="{DynamicResource MicrowinCheckBoxMargin}" IsChecked="True" ToolTip="The First Logon Animation is an animation that is played when a user logs on for the first time. It can artificially increase wait times. Select this option to automatically close the first logon animation and reach the desktop quicker (additional system preparation will still be done)"><AccessText TextWrapping="Wrap" Text="Skip First Logon Animation" /></CheckBox>
14661467
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">WinUtil configuration file (JSON)</TextBlock>
14671468
<Grid>
14681469
<Grid.ColumnDefinitions>

0 commit comments

Comments
 (0)