Skip to content

Commit a518269

Browse files
committed
Additional things
- WPBT done by defaults - Skip Logon Animation - Remove convert to ESD and Upgrade to Win11 as Win10 is no longer supported
1 parent 8ebdf2a commit a518269

2 files changed

Lines changed: 10 additions & 49 deletions

File tree

functions/microwin/Invoke-Microwin.ps1

Lines changed: 10 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,6 @@ public class PowerManagement {
5757
$injectDrivers = $sync.MicrowinInjectDrivers.IsChecked
5858
$importDrivers = $sync.MicrowinImportDrivers.IsChecked
5959

60-
$WPBT = $sync.MicroWinWPBT.IsChecked
61-
$unsupported = $sync.MicroWinUnsupported.IsChecked
62-
$skipFla = $sync.MicroWinNoFLA.IsChecked
63-
6460
$importVirtIO = $sync.MicrowinCopyVirtIO.IsChecked
6561

6662
$mountDir = $sync.MicrowinMountDir.Text
@@ -177,33 +173,17 @@ public class PowerManagement {
177173
}
178174
}
179175

180-
if ($WPBT) {
181-
Write-Host "Disabling WPBT Execution"
182-
reg load HKLM\zSYSTEM "$($scratchDir)\Windows\System32\config\SYSTEM"
183-
reg add "HKLM\zSYSTEM\ControlSet001\Control\Session Manager" /v DisableWpbtExecution /t REG_DWORD /d 1 /f
184-
reg unload HKLM\zSYSTEM
185-
}
186-
187-
if ($skipFla) {
188-
Write-Host "Skipping first logon animation..."
189-
reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE"
190-
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f
191-
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f /ve /t REG_SZ /d "Stop First Logon Animation Process"
192-
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f /v StubPath /t REG_EXPAND_SZ /d '\"%WINDIR%\System32\cmd.exe\" /C \"taskkill /f /im firstlogonanim.exe\"'
193-
reg unload HKLM\zSOFTWARE
194-
}
176+
Write-Host "Disabling WPBT Execution"
177+
reg load HKLM\zSYSTEM "$($scratchDir)\Windows\System32\config\SYSTEM"
178+
reg add "HKLM\zSYSTEM\ControlSet001\Control\Session Manager" /v DisableWpbtExecution /t REG_DWORD /d 1 /f
179+
reg unload HKLM\zSYSTEM
195180

196-
if ($unsupported) {
197-
Write-Host "Bypassing system requirements (locally)"
198-
reg add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v "SV1" /t REG_DWORD /d 0 /f
199-
reg add "HKCU\Control Panel\UnsupportedHardwareNotificationCache" /v "SV2" /t REG_DWORD /d 0 /f
200-
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassCPUCheck" /t REG_DWORD /d 1 /f
201-
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassRAMCheck" /t REG_DWORD /d 1 /f
202-
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassSecureBootCheck" /t REG_DWORD /d 1 /f
203-
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassStorageCheck" /t REG_DWORD /d 1 /f
204-
reg add "HKLM\SYSTEM\Setup\LabConfig" /v "BypassTPMCheck" /t REG_DWORD /d 1 /f
205-
reg add "HKLM\SYSTEM\Setup\MoSetup" /v "AllowUpgradesWithUnsupportedTPMOrCPU" /t REG_DWORD /d 1 /f
206-
}
181+
Write-Host "Skipping first logon animation..."
182+
reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE"
183+
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f
184+
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f /ve /t REG_SZ /d "Stop First Logon Animation Process"
185+
reg add "HKLM\zSOFTWARE\Microsoft\Active Setup\Installed Components\CMP_NoFla" /f /v StubPath /t REG_EXPAND_SZ /d '\"%WINDIR%\System32\cmd.exe\" /C \"taskkill /f /im firstlogonanim.exe\"'
186+
reg unload HKLM\zSOFTWARE
207187

208188
# We have to prepare the target system to accept the diagnostics script
209189
reg load HKLM\zSOFTWARE "$($scratchDir)\Windows\System32\config\SOFTWARE"
@@ -480,20 +460,6 @@ public class PowerManagement {
480460
}
481461
Write-Host "Windows image completed. Continuing with boot.wim."
482462

483-
$esd = $sync.MicroWinESD.IsChecked
484-
if ($esd) {
485-
Write-Host "Converting install image to ESD."
486-
try {
487-
Export-WindowsImage -SourceImagePath "$mountDir\sources\install.wim" -SourceIndex $index -DestinationImagePath "$mountDir\sources\install.esd" -CompressionType "Recovery"
488-
Remove-Item "$mountDir\sources\install.wim"
489-
Write-Host "Converted install image to ESD."
490-
} catch {
491-
Start-Process -FilePath "$env:SystemRoot\System32\dism.exe" -ArgumentList "/export-image /sourceimagefile:`"$mountDir\sources\install.wim`" /sourceindex:1 /destinationimagefile:`"$mountDir\sources\install.esd`" /compress:recovery" -Wait -NoNewWindow
492-
Remove-Item "$mountDir\sources\install.wim"
493-
Write-Host "Converted install image to ESD."
494-
}
495-
}
496-
497463
# Next step boot image
498464
Write-Host "Mounting boot image $mountDir\sources\boot.wim into $scratchDir"
499465
Mount-WindowsImage -ImagePath "$mountDir\sources\boot.wim" -Index 2 -Path "$scratchDir"

xaml/inputXML.xaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,11 +1476,6 @@
14761476
Foreground="{DynamicResource LabelboxForegroundColor}"
14771477
/>
14781478
<Rectangle Fill="{DynamicResource MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
1479-
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap"><Bold>Tweaks (leave empty for default settings)</Bold></TextBlock>
1480-
<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>
1481-
<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>
1482-
<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>
1483-
<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>
14841479
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">WinUtil configuration file (JSON)</TextBlock>
14851480
<Grid>
14861481
<Grid.ColumnDefinitions>

0 commit comments

Comments
 (0)