mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 11:06:18 +00:00
* Fixes #191: Skip Explorer restart when in sysprep mode - Since Settings are applied to Default Profile, calling RestartExplorer does nothing - RestartExplorer also terminates all processes witch might have called WinDebloat in the first place
This commit is contained in:
committed by
GitHub
parent
035565324d
commit
907221b643
@@ -545,12 +545,15 @@ function RegImport {
|
||||
|
||||
# Restart the Windows Explorer process
|
||||
function RestartExplorer {
|
||||
if ($global:Params.ContainsKey("Sysprep")) {
|
||||
return
|
||||
}
|
||||
|
||||
Write-Output "> Restarting Windows Explorer process to apply all changes... (This may cause some flickering)"
|
||||
|
||||
# Only restart if the powershell process matches the OS architecture
|
||||
# Only restart if the powershell process matches the OS architecture.
|
||||
# Restarting explorer from a 32bit Powershell window will fail on a 64bit OS
|
||||
if ([Environment]::Is64BitProcess -eq [Environment]::Is64BitOperatingSystem)
|
||||
{
|
||||
if ([Environment]::Is64BitProcess -eq [Environment]::Is64BitOperatingSystem) {
|
||||
Stop-Process -processName: Explorer -Force
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user